vim-weekly


Issue #16 - June 28th 2014


Tip 1

auto (re)indent entire document

G=gg
  

Source: vim wikia


Tip 2

Send lines 1 - 12 to the printer, omitting the range will cause the entire document to be printed

:1,12ha!
  

Source: vim manual


Tip 3

As above, but write the resulting PostScript in file 'fancy_pdf'. Please note that this is only available when vim is compiled with the +postscript feature

:1,12ha! > fancy_pdf
  

Source: vim manual


Tip 4

Open man page for word under cursor

SHIFT+k
  

Source: tawheed


Tip 5

Set the shell Vim uses for external commands to bash in such a way that it'll source ~/.bash_profile

set shell=/bin/bash --login
  

Source: dotvimrc