Archive for August, 2009

VIm alternative to the ESC key

August 5, 2009

It can be a pain reaching up to the ESC key everytime to exit insert mode in VIm. An alternative that’s built-in by default is Ctrl+[

Paste into VIm without screwing up formatting

August 5, 2009

Often pasting text into vim from an external source screws up the formatting (especially tabs). To prevent this, do:
:set paste

Keeping this setting on screws up auto indentation while in insert mode, though. So to turn off, use
:set nopaste

Piping command outputs into script arguments

August 5, 2009

command | ./myscript does not work as expected.
Use ./myscript $(command) instead