A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

Showing posts with label tabs. Show all posts
Showing posts with label tabs. Show all posts

Show tabs in GNU screen

~/.screenrc

hardstatus string "%{= g} %{= w}%-Lw%{=r}%n%f* %t%{-}%+LW"

(source)

See also byobu, which is one step better than screen.


vim tabs and buffers basics


in vim type  ":grep -Ri search_string *"
...it executes... press enter to get back to vim
then type ":copen" to open a window with the search results in
and you can browse the matches really easily

:help grep

then if you press enter to open one of the files found,
to get back to your original file type :buffers or :ls

:tabe #[number against file] will open the original file in a new tab
:sp #[number against file] will open the original file in a new window

:buffer [number against original file] will open the original file again
and you could make the F keys load the buffers

I prefer tabs over buffers because they're more visible
in bash vim -p file1 file2 will open 2 files in two different tabs
gt and gT will cycle through the files (I have that mapped to alt+left and alt+right)
:tabe will open a file in a new tab


Thanks Phill

Type a literal tab in vi

If you've got "convert tabs to spaces" turned on, type this to insert a real tab:
Ctrl-V [tab]

Vim 'unset' command

Instead of an "unset" command, vi prefixes the option with "no".

So to turn off visible tabs and newlines, use:

:set nolist

Vim: Turn tabs into spaces

:set tabstop=4

:set expandtab