How do I format a paragraph? - gqap How do I join the lines in a paragraph? - vip:join (vip selects a paragraph, :join joins them...) How do I read output from a command? - :read !date How do I pipe the file content to the program? - :%!sort -n How do I get the word under cursor in ex line? - :%s/// - Similarly look for the usage of etc. How do I search for the current word? - *, # In C program. - want to see the declaration of a function, gd How do I jump to the file under the cursor - If you want to replace the current buffer with the new file - gf - If you want to split the buffer and see both the file contents - f How do I remove the auto-indent on a file while pasting? - :set paste :set nopaste How to go down one screen line worth when the text is wrapped? gj and gk go one screen line worth up and down. map j gj map k gk noremap gj noremap gk inoremap gj inoremap gk How to indent a set of lines in vim? From Vim-Tip#83 in command mode, == will indent the current line selecting a range of lines (with shift-v) then == will indent your selection typing a number then == will indent that many lines, starting from your cursor. How to add comments to perl/Latex/C easily? Do Ctrl+V, then keep doing "j" to extend the selection, press I and type your text. finally press . Neat Eh! I used to do :s/^/%/ etc, but this one is better. If you want to be fancier, then check out the Script#955 and VimTip#271. Using command history in vim. There are two ways to edit the command history. First one is "q:", or "q/", or "q?". They all behave like their corresponding ":", "/", "?" commands in command mode, however they give you editor for all the previous commands. Sometimes you are already in the search command and want to open the editor. No problem, just hit ^F, that will take you there. -- Adding adding/removing comments in blocks To add: C-V C-F... Shift-i // [Esc] To remove: C-V C-F... x [Esc]