Thursday, May 29, 2008

[off topic] Darn good quote

It's so much easier to suggest solutions when you don't know too much about the problem.
    -- Malcolm Forbes

[link] Sweeten your Vim with Cream

Simple Vim intro by Linux Magazine.

Monday, May 26, 2008

My personal minimal .vimrc

Another upgrade, another OS, another update... Well, new home directory - consequently new .vimrc.

Here is N hours into coding minimalistic usable .vimrc:


filetype plugin off
syntax on
imap <Insert> <Nop>
set bs=2 ruler title comments= nowrap
set cindent cinkeys-=: cinkeys-=0#
colo torte
let loaded_matchparen = 1
au BufReadPost * if line("'\"") > 0 &&
\ line("'\"") <= line("$") | exe "normal g'\"" | endif


I hope this time, Blogger/BlogSpot hadn't eaten any characters.
The set comment= creeped in before I have realized that filetype plugin is still on.

Saturday, May 24, 2008

Normal command from Insert mode

Always forget the very useful shortcut which is apparently intended for "Vim Easy":

^O

When in insert mode (and, by definition, in easy vim you are always in the mode) to insert command from Normal mode, you press first ^O and then start typing the command.

e.g. to delete to the end of line press ^O followed by Shift-d. Pressing : you can also access all the ex commands too - but that will leave insert mode.