Setting up VIM editor
From Tuxation
(Difference between revisions)
(→Setting up VIM) |
|||
Line 1: | Line 1: | ||
- | + | Oh the good old vim editor, my favorite! | |
When my Kubuntu was up and running, I noticed that vim is not turning on syntax highlighting and not remembering my last cursor position when I last opened the file - the cursor always positions at the top of the file everytime I open it. Time to hack that .vimrc! (/etc/vim/vimrc) | When my Kubuntu was up and running, I noticed that vim is not turning on syntax highlighting and not remembering my last cursor position when I last opened the file - the cursor always positions at the top of the file everytime I open it. Time to hack that .vimrc! (/etc/vim/vimrc) |
Current revision as of 23:46, 17 October 2007
Oh the good old vim editor, my favorite!
When my Kubuntu was up and running, I noticed that vim is not turning on syntax highlighting and not remembering my last cursor position when I last opened the file - the cursor always positions at the top of the file everytime I open it. Time to hack that .vimrc! (/etc/vim/vimrc)
" turn on syntax highlighting syntax on ' turn on pattern highlighting during search set hlsearch " Make VIM move the cursor automatically to the last position when we last opened the file. if has("autocmd") autocmd BufReadPost * \\ if line("'\'") > 0 && line("'\'") <= line("$") | \\ exe "normal g`\\"" | \\ endif endif