Commonly used Vim commands

:sav (save as)
c (change)
d (delete)
{ } (page up, down)
/ (search)
:wq (save, quit)

:%s/findme/replaceto/gc (replace within file, multiple occurence per line, confirmation)

v: Visual Mode
Shift+v : Line Visual Mode
Ctrl+v , then Shift+i : Column-wise Insert

:set autoindent
:set cindent
:set scrolloff=1000

:bufdo %s/from/replace/ge | w (search and replace, to all buffers)

(From command line) ctags -R .
Ctrl + ] = go to definition
Ctrl + T = go back to caller
:set tags=(the topmost ctags file desired)


syntax on
"set autoindent
"set cindent
set smartindent
filetype plugin on

let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1

"Set color scheme
set t_Co=256
colorscheme desert256
"colorscheme gardener

"Enable indent folding
set foldenable
set fdm=indent
set tags=../tags

Posted on July 24, 2011, in Science & Technology, The Lab and tagged . Bookmark the permalink. 2 Comments.

  1. Ctrl+w, v : split the window vertically
    Ctrl+w, s : split the window horizontally
    :set num : display line number

    show that to your mom, she will be fascinated.🙂

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 )

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

%d bloggers like this: