VimTip 16: Avoiding the "Hit ENTER to continue" prompts http://vim.sf.net/tip_view.php?tip_id=16 To avoid the "Hit ENTER to continue" prompt, use the 'shortmess' option. Add the following line to your .vimrc file: set shortmess=a Also, you can increase the height of the command line to 2 set cmdheight=2 The default command height is 1. To get more help on these options, use :help hit-enter :help shortmess :help cmdheight VimTip 12: Converting tabs to spaces http://vim.sf.net/tip_view.php?tip_id=12 VimTip 18: Cleanup your HTML http://vim.sf.net/tip_view.php?tip_id=18 From Johannes Zellner on the vim list: You can use vim's makeprg and equalprg to clean up HTML. First download html tidy from http://www.w3.org/People/Raggett/tidy/. Then use the following commands. vim6? exe 'setlocal equalprg=tidy -quiet -f '.&errorfile setlocal makeprg=tidy -quiet -e % vim5? exe 'set equalprg=tidy -quiet -f '.&errorfile set makeprg=tidy -quiet -e % At this point you can use make to clean up the full file or you can use = to clean up sections. :help = :help equalprg :help makeprg VimTip 30: Increasing or decreasing numbers http://vim.sf.net/tip_view.php?tip_id=30 To increase a number under or nearest to the right of the cursor, go to Normal mode and type: Ctrl-A To decrease, type: Ctrl-X Using this in a macro simplifies generating number sequences a lot. VimTip 31: Find and Replace http://vim.sf.net/tip_view.php?tip_id=31 To find and replace one or more occurences of a given text pattern with a new text string, use the s[ubstitute] command. There are a variety of options, but these are what you most probably want: :%s/foo/bar/g find each occurance of 'foo' and replace it with 'bar' without asking for confirmation :%s/foo/bar/gc find each occurance of 'foo' and replace it with 'bar' asking for confirmation first :%s//bar/gc find (match exact word only) and replace each occurance of 'foo' with 'bar' :%s/foo/bar/gci find (case insensitive) and replace each occurance of 'foo' with 'bar' :%s/foo/bar/gcI find (case sensitive) and replace each occurance of 'foo' with 'bar' NB: Without the 'g' flag, replacement occurs only for the first occurrence in each line. For a full description and some more interesting examples of the substitute command refer to :help substitute See also: :help cmdline-ranges :help pattern :help gdefault VimTip 36: Using Gnu-info help in vim http://vim.sf.net/tip_view.php?tip_id=36 K in normal bring you the man page about the keyword under current cursor. :nnoremap :exe ":!info ".expand("") Now press F1 while the cursor is hold by a keyword such as printf will bring you to Gnu-info help page :h :h nnoremap VimTip 40: Insert a file http://vim.sf.net/tip_view.php?tip_id=40 To insert the contents of a file (or the output of a system command) into the current buffer, use the r[ead] command: Examples: :r foo.txt inserts the file foo.txt below the cursor :0r foo.txt inserts the file foo.txt above the first line :r !ls inserts a listing of your directory below the cursor :$r !pwd inserts the current working directory below the last line For more information about the r[ead] command refer to: :help read See also: :help cmdline-ranges :help !cmd VimTip 42: Using marks http://vim.sf.net/tip_view.php?tip_id=42 To mark one or more positions in a file, use the m[ark] command. Examples: ma - set current cursor location as mark a 'a - jump to beginning of line of mark a `a - jump to postition of mark a d'a - delete from current line to line of mark a d`a - delete from current cursor position to mark a c'a - change text from current line to line of mark a y`a - yank text to unnamed buffer from cursor to mark a :marks - list all the current marks NB: Lowercase marks (a-z) are valid within one file. Uppercase marks (A-Z), also called file marks, are valid between files. For a detailed description of the m[ark] command refer to :help mark See also: :help various-motions VimTip 43: Using abbreviations http://vim.sf.net/tip_view.php?tip_id=43 To define abbreviations, use the ab[breviate] command. Examples: :ab rtfm read the fine manual - Whenever you type 'rtfm' followed by a (or or ) vim will expand this to 'read the fine manual'. :ab - list all defined abbreviations :una[bbreviate] rtfm - remove 'rtfm' from the list of abbreviations :abc[lear] - remove all abbreviations NB: To avoid expansion in insert mode, type CTRL-V after the last character of the abbreviation. For a detailed description of the ab[breviate] command and some more examples refer to :help abbreviations VimTip 49: Switching case of characters http://vim.sf.net/tip_view.php?tip_id=49 To switch the case of one or more characters use the "~", "gU" or "gu" commands. Examples: ~ - switch case of character under cursor (in visual-mode: switch case of highlighted text) 3~ - switch case of next three characters g~~ - switch case of current line U - in visual-mode: make highlighted text uppercase gUU - make current line uppercase u - in visual-mode: make highlighted text lowercase guu - make current line lowercase gUaw - make current word uppercase guaw - make current word lowercase For some more examples refer to :help ~ See also: :help simple-change et VimTip 184: How to obscure text instantaneously http://vim.sf.net/tip_view.php?tip_id=184 map ggVGg? so next time some body comes along just press and all the buffer will be rot-13 encoded. to decode just press again. Njoy VimTip 193: Insert the current filename at cursor postion. http://vim.sf.net/tip_view.php?tip_id=193 imap \fn =expand("%:t:r") " reading Ms-Word documents, requires antiword :autocmd BufReadPre *.doc set ro :autocmd BufReadPre *.doc set hlsearch! :autocmd BufReadPost *.doc %!antiword "%"