" Author : Pranesh Srinivasan " Date First Edited : 14th March 2008 " " Works with the following plugins " cvim - for various c/c++ utils Start a C/C++ file & read the docs " crefvim - for c reference in Vim Style " taglist - for listing the entire project in a comfy manner. Try :TlistToggle " (This has been currently mapped to F2) " " latexSuite-1.5 - the ulitmate LaTeX IDE for VIM " mruex - exploring most recently used files (in normal mode \r - " recent) [DISABLED FOR THE TIME BEING] " " matrix - screensaver :) (:Matrix) " colorscheme evening syntax on set nocompatible set showmode set ruler set mousemodel=popup set lz " do not redraw during macros - lazy redraw set ai " autoindent set si " smartindent set gdefault set incsearch "inc search to allow less typing in of chars set matchpairs+=<:> "adds < > to the % jumping set guioptions-=T " removes Toolbar from standard gvim set foldenable "Visual Cues set listchars=tab:\|\ ,trail:.,extends:>,precedes:<,eol:$ " what to show when I hit :set list filetype plugin on "to switch on auto file detection and enable plugins " -------------------- Normal Maps :) ------------ map :setlocal spell spelllang=en_us map :setlocal nospell map :make nmap w nmap W nmap h nmap l " ----------------------- Plugin Mappings ----------- " "------------------------------------------------------ nmap :TlistToggle "au BufWinLeave * mkview "This is to keep marks etc.. in storage. "------------------------ File Hooks follow ------------ " A few autocmd commands follow autocmd FileType c,cpp call ccomstuff() autocmd FileType c call cstuff() autocmd FileType cpp call cppstuff() function ccomstuff() set cindent set formatoptions+=croql set formatoptions-=t map :!./a.out "The following mapping puts function comment. Hover over name map \fc F "nyf("ry0f(l"ayf)O/*54A-o"npxoArgs: "apxoReturns: "rpoThrows:See:Bugs:54A-a*/6kA -- endfunction function cstuff() set makeprg=gcc\ \"%\" nmap :!ctags *.c *.h endfunction function cppstuff() set makeprg=g++\ \"%\" nmap :!ctags *.cpp *.h endfunction