Short Tip: Simple .vimrc lines

Once in a while there is the need for vim on machines which are usually under control of someone else. In such cases it is handy to have the most important lines for vimrc right at the hand:

set laststatus=2        " grey status bar at the bottom
syn on                  " syntax highlighting
filetype indent on      " activates indenting for files
set ai                  " auto indenting
set nu                  " line numbers
set ic                  " case insensitive search
colorscheme desert      " colorscheme desert

Once again, the idea of these short lines is to have the basic functionality in vim – if there is the time to set up a properly vimrc with tens of lines, I could also copy mine over. But if you just need to do some quick things these lines are useful.

If anyone has other really helpful lines please leave a comment (and explain the lines with a few words, just as above) – but in case such “helpful” lines take more than one line it s already too much. For postinbg source code in the comment section, please read How do I post source code?.


7 thoughts on “Short Tip: Simple .vimrc lines”

  1. :set scs “smartcase: Ignore case only if search string has no Uppercase chars.
    :set bg=dark “works well with white-on-black scheme

  2. Last [sourcecode] tag should be changed to [slash sourcecode].

    Thanx for the info dude.

  3. nvi supports incsearch as well, so in case you ever need to edit a file on a machine without vim (god forbid), you can put the following in your .exrc:

    set searchincr

Comments are closed.