Vim tidbits of the day – 9/22/08

:bd – closes the current buffer window

CTRL-F – page down; CTRL-B – page up; CTRL-D – put current line in the center of your screen

CTRL-R – Redo (plus COUNT for redoing a number of changes); ‘u‘ is for undo; ‘U‘ is for undoing all changes on a particular line

:set undolevels=NUM – number of changes saved in memory (can set to negative number if running out of memory

:split – split your current window into two; switch between windows with CTRL-W CTRL-W

!{cmd} – run a shell command, shows you the output and prompts you before returning to your current buffer; ‘:!‘ by itself runs the last external command; ‘:!!‘ repeats the last command; :silent !{cmd} eliminates the need to hit enter after the command is done; ‘:r !{cmd}‘ puts the output of $cmd into the current buffer.

You must be logged in to post a comment.