Blog Archives

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)

—-.vimrc—-

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
Advertisements