Short Tip: Simple .vimrc lines

shell.png
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?.

Advertisements

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

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s