Things I always Forget: VIM edition


Vim is a great editor. I like to use it when I’m in the shell and don’t have access to Textmate or don’t want to wait for Textmate to load up.

Mapping something in insert mode, to save typing

inoremap <C-E> \={E}

This creates an entry in insert mode such that Control-E types the LaTeX code for an majuscule E with macron.

Consult Yegappan’s guide to map

Don’t use Escape

On keyboards in the US, Control-[ is equivalent to ESCAPE, and thus can get you out of insert mode into normal mode in a slightly more reasonable setup than reaching for escape. Besides, if you have the control key where God intended ( on the Caps Lock key ) this is a snap.

List the key bindings

  • map: list all the key mappings
  • nmap: list all the normal-mode mappings