Tuesday, May 13, 2008

vimrc

This is the vimrc I use:

" Set syntax on
syntax on

" Indent automatically depending on filetype
filetype indent on
set autoindent

" Case insensitive search
set ic

" Higlhight search
set hls

" Incremental search
set incsearch

" Wrap text instead of being on one line
set lbr

" Change colorscheme from default to delek
colorscheme delek

" statusline shown in blue
highlight StatusLine ctermfg=darkblue ctermbg=white

" Show ruler
set ruler

" Set the shell to use
set shell=bash

" Show brace matching as you edit
set showmatch

" Show working mode
set showmode

" Show the command
set showcmd

" Display a status bar
set laststatus=2

" Number of screen lines to use for the command-line
set cmdheight=1

" Shift width when you press <<>> to indent a line.
set shiftwidth=3

" Set Shift rounding off
set shiftround

" Patten matching
set magic

" Switch buffer to edit a new file, and use open file if it already open
set switchbuf=useopen,split

" Changes how backspace works.
set bs=2

" Expand Tab
set expandtab

" Number of spaces for a tab
set tabstop=8

" lines longer than the width of the window will not wrap
set wrap

" Searches does not wrap around the end of the file
set nowrapscan

"Not always equal
set noequalalways

"F2 to Save file
map :w
map B :w

map! :wa
map! B :wa

"F6 to switch window
map w

"Ctrl-Shift-F6 to show only curent file for editing in many windows
map :only!

"- to decrease the current window height
map - -

"= to increase the current window height
map = +

"_ to decrease the current window width
map _ <

"+ to increase the current window width
map + >

"Alt-Up to go to upper window
map k

"Alt-Down to go to the lower window
map j

"Alt-Left to go to the left window
map h

"Alt-Down to go to the right window
map l

Acknowledgments to my friend and mentor Shriram V. This vimrc is the set of those lines which I understood from his highly sophisticated version :)

No comments: