|  | "====================================================================== | 
        
          |  | "general Settings | 
        
          |  | "====================================================================== | 
        
          |  | set tabstop=4 | 
        
          |  | set shiftwidth=0 | 
        
          |  | set softtabstop=0 | 
        
          |  |  | 
        
          |  | nmap ,li : set list<cr> | 
        
          |  | nmap ,nli : set nolist<cr> | 
        
          |  |  | 
        
          |  | set textwidth=0 | 
        
          |  | set noexpandtab | 
        
          |  | set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:< | 
        
          |  | set nolist | 
        
          |  | colorscheme twilight | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "Override setting according to file extention | 
        
          |  | "====================================================================== | 
        
          |  | filetype on | 
        
          |  | filetype plugin indent on | 
        
          |  | au FileType perl,ruby,clojure,objc,python,java,c,cpp,cs,html,css,php,php4,js,javascript,css,jsp,sh set nu | 
        
          |  | "====================================================================== | 
        
          |  | "toggle concatenation of opening brace position | 
        
          |  | "====================================================================== | 
        
          |  | au FileType java,c,cpp,cs,js,javascript,jsp map ,cb : %s/\n{/\ {/g<cr> | 
        
          |  | au FileType java,c,cpp,cs,js,javascript,jsp map ,ncb : %s/\ {/\r{/g<cr> | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "vim-ruby Setting | 
        
          |  | "====================================================================== | 
        
          |  | compiler ruby | 
        
          |  | au FileType ruby set tabstop=2 | 
        
          |  | au FileType ruby set shiftwidth=2 | 
        
          |  | au FileType ruby set softtabstop=2 | 
        
          |  | au FileType ruby map <F2> : !ruby % | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "vimClojure Setting | 
        
          |  | "====================================================================== | 
        
          |  | let clj_highlight_builtins = 1 | 
        
          |  | let clj_highlight_contrib = 1 | 
        
          |  | let clj_paren_rainbow = 1 | 
        
          |  | let clj_want_gorilla = 1 | 
        
          |  | let vimclojure#NailgunClient="/home/khmirage/Util/clojure/vimclojure/ng" | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "Key Mapping Setting | 
        
          |  | "====================================================================== | 
        
          |  | "Whitespace Line Insert Mapping | 
        
          |  | "====================================================================== | 
        
          |  | map .j o | 
        
          |  | map .k O | 
        
          |  | map .ti i	w | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "To HTML | 
        
          |  | "====================================================================== | 
        
          |  | map .th : TOhtml<CR> | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "Shell Script Running | 
        
          |  | "====================================================================== | 
        
          |  | au FileType sh map <F2> : !chmod +x % | 
        
          |  | au FileType sh map <F3> : !./% | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "C Compiler Mapping | 
        
          |  | "====================================================================== | 
        
          |  | au FileType c set tabstop=4 | 
        
          |  | au FileType c set noexpandtab | 
        
          |  | au FileType c set shiftwidth=4 | 
        
          |  | au FileType c set softtabstop=4 | 
        
          |  | au FileType c map <F2> : !gcc -W -Wall -o %< % | 
        
          |  | au FileType c map <F3> : !./%< | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "C++ Compiler Mapping | 
        
          |  | "====================================================================== | 
        
          |  | au FileType cpp set tabstop=4 | 
        
          |  | au FileType cpp set noexpandtab | 
        
          |  | au FileType cpp set shiftwidth=4 | 
        
          |  | au FileType cpp set softtabstop=4 | 
        
          |  | au FileType cpp map <F2> : !g++ -W -Wall -o %< % | 
        
          |  | au FileType cpp map <F3> : !./%< | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "Mono Compiler Mapping | 
        
          |  | "====================================================================== | 
        
          |  | au FileType cs map <F2> : !mcs % | 
        
          |  | au FileType cs map <F3> : !mono %<.exe | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "Python Mapping | 
        
          |  | "====================================================================== | 
        
          |  | au FileType python map <F2> : !python % | 
        
          |  | au FileType python set tabstop=8 | 
        
          |  | au FileType python set shiftwidth=4 | 
        
          |  | au FileType python set softtabstop=4 | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "Javascript Mapping | 
        
          |  | "====================================================================== | 
        
          |  | au FileType javascript map <F2> : !node % | 
        
          |  | au FileType javascript set tabstop=2 | 
        
          |  | au FileType javascript set expandtab | 
        
          |  | au FileType javascript set shiftwidth=2 | 
        
          |  | au FileType javascript set softtabstop=2 | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "Java Compiler Mapping | 
        
          |  | "====================================================================== | 
        
          |  | au FileType java map <F2> : !javac % | 
        
          |  | au FileType java map <F3> : !java %< | 
        
          |  | au FileType java map <F4> : !appletviewer %< | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "JSP -> Firefox Launch Mapping | 
        
          |  | "====================================================================== | 
        
          |  | au FileType jsp map <F2> : !firefox http://localhost:8180/lecture/% | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "Objective C Compiler Mapping | 
        
          |  | "====================================================================== | 
        
          |  | au FileType objc map <F2> : !gcc -Wall -o %< % -lobjc | 
        
          |  | au FileType objc map <F3> : !./%< | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "Perl excute Mapping | 
        
          |  | "====================================================================== | 
        
          |  | au FileType perl map <F2> : !perl -w % | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "vimwiki Mapping | 
        
          |  | "====================================================================== | 
        
          |  | au FileType vimwiki set textwidth=0 | 
        
          |  | au FileType vimwiki set noexpandtab | 
        
          |  | au FileType vimwiki set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:< | 
        
          |  | au FileType vimwiki set list | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "cscope settings | 
        
          |  | "====================================================================== | 
        
          |  | set csprg=/usr/bin/cscope | 
        
          |  | set nocsverb | 
        
          |  | cs add /home/username/vim/linux-3.7.1/cscope.out | 
        
          |  | set csverb | 
        
          |  | set csto=0 | 
        
          |  | set cst | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "man settings | 
        
          |  | "====================================================================== | 
        
          |  | func! Man() | 
        
          |  | let sm = expand("<cword>") | 
        
          |  | exe "!man -S 2:3:4:5:6:7:8:9:tcl:n:l:p:o ".sm | 
        
          |  | endfunc | 
        
          |  | nmap ,ma :call Man()<cr><cr> | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "ctag shortcut mapping | 
        
          |  | "====================================================================== | 
        
          |  | if version >= 500 | 
        
          |  | func! Sts() | 
        
          |  | let st = expand("<cword>") | 
        
          |  | exe "sts ".st | 
        
          |  | endfunc | 
        
          |  | nmap ,st :call Sts()<cr> | 
        
          |  |  | 
        
          |  | func! Tj() | 
        
          |  | let st = expand("<cword>") | 
        
          |  | exe "tj ".st | 
        
          |  | endfunc | 
        
          |  | nmap ,tj :call Tj()<cr> | 
        
          |  | endif | 
        
          |  |  | 
        
          |  | "====================================================================== | 
        
          |  | "cscope shortcut mapping | 
        
          |  | "====================================================================== | 
        
          |  | func! Css() | 
        
          |  | let css = expand("<cword>") | 
        
          |  | new | 
        
          |  | exe "cs find s ".css | 
        
          |  | if getline(1) == "" | 
        
          |  | exe "q!" | 
        
          |  | endif | 
        
          |  | endfunc | 
        
          |  | nmap ,css :call Css()<cr> | 
        
          |  |  | 
        
          |  | func! Csc() | 
        
          |  | let csc = expand("<cword>") | 
        
          |  | new | 
        
          |  | exe "cs find c ".csc | 
        
          |  | if getline(1) == "" | 
        
          |  | exe "q!" | 
        
          |  | endif | 
        
          |  | endfunc | 
        
          |  | nmap ,csc :call Csc()<cr> | 
        
          |  |  | 
        
          |  | func! Csd() | 
        
          |  | let csd = expand("<cword>") | 
        
          |  | new | 
        
          |  | exe "cs find d ".csd | 
        
          |  | if getline(1) == "" | 
        
          |  | exe "q!" | 
        
          |  | endif | 
        
          |  | endfunc | 
        
          |  | nmap ,csd :call Csd()<cr> | 
        
          |  |  | 
        
          |  | func! Csg() | 
        
          |  | let csg = expand("<cword>") | 
        
          |  | new | 
        
          |  | exe "cs find g ".csg | 
        
          |  | if getline(1) == "" | 
        
          |  | exe "q!" | 
        
          |  | endif | 
        
          |  | endfunc | 
        
          |  | nmap ,csg :call Csg()<cr> |