this is a little vimrc that is just about right for small purposes..

(edit the file ~/.vimrc for user specific changes and /etc/vimrc?? for systemwide configuration)

syntax on
filetype indent plugin on

set autoindent
set smartindent

set tabstop=4
set expandtab
set shiftwidth=4
set softtabstop=4

set number
set background=light
set smartcase
set cursorline


  • smartcase searches smart:
    /copyright      " Case insensitive
    /Copyright      " Case sensitive
    /copyright\C    " Case sensitive
    /Copyright\c    " Case insensitive
  • indentation:
    • autoindent: same as line before
    • smartindent: does some thinking (one level deeper for “if else”, etc.)
  • cursorline:
    • highlights current line of cursor position
  • The command zc will close a fold (if the cursor is in an open fold), and zo will open a fold (if the cursor is in a closed fold). It’s easier to just use za which will toggle the current fold (close it if it was open, or open it if it was closed).The commands zc (close), zo (open), and za (toggle) operate on one level of folding, at the cursor. The commands zC, zO and zA are similar, but operate on all folding levels (for example, the cursor line may be in an open fold, which is inside another open fold; typing zC would close all folds at the cursor).The command zr reduces folding by opening one more level of folds throughout the whole buffer (the cursor position is not relevant). Use zR to open all folds.The command zm gives more folding by closing one more level of folds throughout the whole buffer. Use zM to close all folds.



Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s