Label Cloud

Friday, December 14, 2007

[VIM] notes

find match of current parenthesis, brace, or bracket

%

on the fly spell checking (vim 7.0)

:set spell - Turns on the spell checking
:set nospell - Turns off the spell checking (can be achieved using GUI too).
]s - Move to the next mis-spelled word in the document.
[s - Same as above command but searches backwards.
z= - Shows a list of close matches to the mis-spelled word from which the user can pick the correct one.

folding by {{{ ... }}} marker

:set foldmethod=maker

set shiftwidth to 2 in C indent

:set cino=>2

automatically word wrap for tex

let s:extfname = expand("%:e")
if s:extfname == "tex"
set textwidth=70
endif

free Fortran90 format

let s:extfname = expand("%:e")
if s:extfname == "f90" || s:extfname == "F"
let fortran_free_source=1
unlet! fortran_fixed_source
else
let fortran_fixed_source=1
unlet! fortran_free_source
endif

0 comments:

About

My photo
Taipei, Taiwan
3rd Year Ph.D Student in Chemical Biology and Biological Physics of Academia Sinica

Google Analytics