Penguin, small TECH.BARWICK.DE
vim
 

Recent posts

Categories

Archive

Syndication

 



Powered By

Info

vim

Disclaimer: I use Emacs too.

Tuesday, August 12, 2014   8:44 PM

Essential .vimrc

Recently I ended up using vim on a Mac I hadn't used for a long while and it was like travelling down a time tunnel to 15 year ago. I can live without syntax highlighting, but the cursor key movement was very wonky and was causing spurious escape-like characters to be inserted when moving in insert mode. I originally thought I was using the OS X defaukt vim, but it turned out to be a reasonably up-to-date MacPorts version.

It turned out the .vimrc file was missing without trace, which causes vim to revert at least partially to old-style vi behaviour. The mere presence of an empty .vimrc file should be enough to remind vim that it is infact the second decade of the 21st century. However, to be on the safe side a minimal .vimrc file should contain at least the following lines:

set nocompatible
set bs=2
syntax on

Posted in vim | add a comment