Difference between revisions of "Vim"
From assela Pathirana
Jump to navigationJump to search
(Created page with '==A simple <tt>.vimrc</tt> file== Usually the following content in <tt>~/.vimrc</tt> file is enough to tame vim to match my editing requirements. <pre> set nocompatible " I use…') |
|||
| Line 3: | Line 3: | ||
<pre> | <pre> | ||
set nocompatible " | set nocompatible "We are running vim not old we no need to be constrained! | ||
set | set bs=2 "backspace works. | ||
set smartindent | set smartindent "indents programs | ||
set tabstop=4 | set tabstop=4 "tab stops 4 chars | ||
set shiftwidth=4 | set shiftwidth=4 "autoindent width | ||
set | "Shortcut to auto indent entire file | ||
set | nmap <F11> 1G=G | ||
set | imap <F11> <ESC>1G=Ga | ||
set incsearch | |||
set | set ignorecase | ||
set smartcase | |||
"Informative status line | |||
set statusline=%F%m%r%h%w\ [TYPE=%Y\ %{&ff}]\ [%l/%L\ (%p%%)] | |||
"Have 3 lines of offset (or buffer) when scrolling | |||
set scrolloff=3 | |||
</pre> | </pre> | ||
[[Category:Computing]][[Category:Unix]] | [[Category:Computing]][[Category:Unix]] | ||
Latest revision as of 13:00, 7 March 2011
A simple .vimrc file
Usually the following content in ~/.vimrc file is enough to tame vim to match my editing requirements.
set nocompatible "We are running vim not old we no need to be constrained!
set bs=2 "backspace works.
set smartindent "indents programs
set tabstop=4 "tab stops 4 chars
set shiftwidth=4 "autoindent width
"Shortcut to auto indent entire file
nmap <F11> 1G=G
imap <F11> <ESC>1G=Ga
set incsearch
set ignorecase
set smartcase
"Informative status line
set statusline=%F%m%r%h%w\ [TYPE=%Y\ %{&ff}]\ [%l/%L\ (%p%%)]
"Have 3 lines of offset (or buffer) when scrolling
set scrolloff=3