This changes quite often as I am constantly learning new tricks.
set nocompatible
set ignorecase
set smartcase
set hidden
set incsearch
set tabstop=3
set expandtab
set shiftwidth=3
set ruler
nnoremap <C-n> :bn<CR>
nnoremap <C-p> :bp<CR>
” check perl code with :make
autocmd FileType perl set makeprg=perl\ -c\ %\ $*
autocmd FileType perl set errorformat=%f:%l:%m
autocmd FileType perl set autowrite
” check perl code with :make
autocmd FileType perl set makeprg=perl\ -c\ %\ $*
autocmd FileType perl set errorformat=%f:%l:%m
autocmd FileType perl set autowrite
autocmd FileType perl set autowrite




A bunch of enhancements are only available in vim mode. You can turn off vi compatibility by doing:
set nocompatible
As as example, I usually enable the ruler for the bottom of the screen:
set ruler
Thanks Justin!
“This option has the effect of making Vim either more Vi-compatible, or make Vim behave in a more useful way.” – The Vim documentation
Nuff said. However, if you are going to do this (I did) you should also read this from the same docs, “CAREFUL: Setting or resetting this option can have a lot of unexpected effects: Mappings are interpreted in another way, undo behaves differently, etc. If you set this option in your vimrc file, you should probably put it at the very start.”
You don’t need to specify “set nocompatible” if you are using a .vimrc or a .gvimrc. It’s implied automatically. See :help nocompatible
[...] my current .vimrc file [...]