本文共 2194 字,大约阅读时间需要 7 分钟。
一步一步按这个文档搭好VIM环境
使用过程中一些心得记录下来:
1、Vim是ctrl o(字母) 是用来往回跳。不是什么CTRL + T
2、跳至某个函数则可以通过CTRL 键加MOUSE点击跳进去,也可以通过ctrl +] 3、的确可以做到上文所写的MINIBUF效果,此时切换不同的文件,可以直接用MOUSE双击。 4、这样打造之后,与SOURCE INSIGHT的差距已几乎没有了。 最主要的两个SI功能是: 1、跟进函数 - 与SI一样, 按住CTRL,再用MOUSE单击 2、回跳: ctrl o(字母) 5、查一个函数被谁引用,就用”ctrl” + “-” + “e” ,--------我的VIM ------
set tags=tags;/
set nocompatible set history=400 set autoread “set mouse=a syntax enable “colorscheme elflord set so=7 set wildmenu set ruler set cmdheight=2 set nu set backspace=eol,start,indent set whichwrap+=<,>,h,l set showmatch set mat=2 set hlsearch set isset nofen
set fdl=0set expandtab
set shiftwidth=2 set ambiwidth=double set smarttab set ts=4 set lbr set tw=500 set selection=inclusiveset ai
set sw=4 set si set cindent “usage: select codes, press ‘=’ key, the codes will autoindenting set wrapif has(“multi_byte”)
if getfsize(expand(“%”)) > 0 set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,latin1 else set fileencodings=cp936,big5,euc-jp,euc-kr,latin1 endifif v:lang =~ “^zh_CN”
set encoding=cp936 set termencoding=cp936 set fileencoding=cp936 endifif v:lang =~ “utf8 "||v:lang= "UTF−8 ”
set encoding=utf-8 set termencoding=utf-8 set fileencoding=utf-8 endif else echoerr “Sorry, this version of (g)vim was not compiled with multi_byte” endifif &diff
let Tlist_Auto_Open=0 “don’t auto pen when compare two files else let Tlist_Auto_Open=1 “auto pen Tlist when open a file endifnmap s :cs find s =expand(“”)
nmap g :cs find g =expand(“”) nmap c :cs find c =expand(“”) nmap t :cs find t =expand(“”) nmap e :cs find e =expand(“”) nmap f :cs find f =expand(“”) nmap i :cs find i ^=expand(“”)$ nmap d :cs find d =expand(“”) set cscopequickfix=s-,c-,d-,i-,t-,e-,g- nmap :cnext nmap :cprevmap :!ctags -R –c++-kinds=+p –fields=+iaS –extra=+q .
set nocp
filetype plugin onset mouse=a ” Enable mouse usage (all modes) “使用鼠标
“使用SUPERTAB
let g:SuperTabDefaultCompletionType=”context” ” SuperTab使用很简单,只要在输入变量名或路径名等符号中途按Tab键,就能得到以前输入过的符号列表,并通过Tab键循环选择 ““wnmanager
let g:miniBufExplMapWindowNavVim = 1 let g:miniBufExplMapWindowNavArrows = 1 let g:miniBufExplMapCTabSwitchBufs = 1 let g:miniBufExplModSelTarget = 1 let g:miniBufExplMoreThanOne=0colo evening
转载地址:http://doypi.baihongyu.com/