2010-03-02

More vim tidbits

it's been a while since I put anything new up, but I have a bunch of post-it notes stuck to my monitor that I'd be mighty peeved if the cleaner 'cleaned' them away so I'm transcribing them to the web.


C^w L => turn current pane into vertical split on the right
C^w T => turn the current pane into a tab
C^w F => open the file currently under the cursor in a new horizontal split


gi => move cursor to the last place you were in insert mode

ci" => delete the contents of a double quoted string and enter insert mode
ci] => delete the contents of matched square brackets .... you get the idea.
ct" => as above, but only deletes from the current cursor position to the end of the section


command chains: you can batch up a list of commands to execute in sequence using the | (pipe) symbol. ie. ":sp|bn" will split the window and change the selected pane to the next buffer. useful for when you open more than one file from the command line