Vim, the Power of Antiquity

"The Shinkansen Tour"

Giles Orr


But ... Using vi HURTS

Yes, it really is that old: Wikipedia

What is Vim and do I Care?

To run vim to see what vi looked like: vim -u NONE


let mapleader="-"
nnoremap <leader>ev :tabnew $MYVIMRC<CR>
" _R_e_I_ndent whole file:
nnoremap <leader>ri msHmtgg=G'tzt`s

I chose "-" as my leader because it's unused in vim, and very handy if you use the Dvorak keyboard layout. For Qwerty users, ";" is probably the most accessible choice.

Syntax Highlighting

Vim syntax highlighting is garish

Syntax Highlighting Part II

I've had weird behaviour from "moria:" in the end I edited the moria.vim file to force a dark background at all times.

Syntax Highlighting Part III

web page that shows multiple vim colour schemes side-by-side for the same piece of code (choice of several languages)

If you go to , I recommend Chrome. Don't get me wrong, Firefox is my default browser, but the language tests often choke it.

Syntax Highlighting Part IV

Syntax Highlighting - Ugly Code

    if [ -e /usr/share/terminfo/x/xterm?256color ]
        export TERM='xterm-256color'
        export TERM='xterm-color'
        if &term=="xterm-256color"
            set t_Co=256 " "terminal has 256 colors"

Programming Vim


Pathogen requires more work on your part creating directories and running "git clone ..." commands. Vundle only needs a pointer to a github (or other) repo and it does the checkouts for you.

Plugins, Part II

There are LOTS of language-specific plugins.


airline status bar
airline status bar showing git changes
airline status bar in insert mode