Jeff Roberts
RHCE #804006066322833
Vim-Fu is now iPhone and Android friendly

Check out the Vim-Fu Store!

Vim-Fu

My current .vimrc file

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

4 comments to My current .vimrc file

  • Justin

    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

    • admin

      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.”

    • Matt

      You don’t need to specify “set nocompatible” if you are using a .vimrc or a .gvimrc. It’s implied automatically. See :help nocompatible

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>