Matt's Blog

Vim tricks

Sat May 5 13:48:21 EST 2007

[Some tips on using vim]. One thing that I've noticed on several hosts is that files open to the last position edited. To set this us use

set viminfo='20,\"50
autocmd BufReadPost * if line("'\"") | exe "'\"" | endif

or in general use '" to move to the mark of last position edited in the file. If you actually want to start at the front of the file then a quick 1G or gg will take you there.

Also found another [article on moving around in Vim].



code (31)

erlang (6)
ideas (24)
lisp (1)
me (15)
notes (6)
ocaml (5)
physics (46)
qo (7)
unix (7)
vim (4)