经典vim插件功能说明、安装方法和…

 1 #=============================================================================
  2 转载请注明出处: http://blog.csdn.net/tge7618291

                  http://nuoerlz.35free.net

  8 #=============================================================================
  91. 查看 key相关信息说明的命令  :helpkeycodes
 10
 11#=============================================================================
 122. ctags
 13(1). 帮助手册查看
 14    :helpusr_29
 15
 16(2). 功能
 17    ctags的功能,只要在unix/linux环境编程过的人都知道它的历害! 我在这也作个小
 18    小介绍吧ndow=0:对浏览代码非常的方便, 可以在函数, 变量之间跳来跳去等等.(注
 19            意:我这里说到的仅是小小的一部分!).
 20
 21(3). 安装
 22    首先,下载ctags安装包, 然后解压并安装, 命令如下:
 23    $tar -xzvf ctags-5.6.tar.gz
 24    $cd ctags-5.6
 25    $make
 26    #make install   // 需要root权限
 27        或:
 28        $tar -xzvf ctags-5.7.tar.gz
 29        $cd ctags-5.7
 30        $./configure
 31        #make
 32        #make install
 33
 34
 35(4). 使用方法
 36    然后去你的源码目录,如果你的源码是多层的目录, 就去最上层的目录, 在该目录下
 37    运行命令:ctags -R
 38    我现在以vim71 的源码目录做演示
 39    $cd /home/nuoerll/vim71
 40    $ctags -R
 41    
 42    此时在/home/nuoerll/vim71目录下会生成一个tags 文件, 现在用vim打开
 43    /home/nuoerll/vim71/src/main.c
 44    $vim /home/nuoerll/vim71/src/main.c
 45    
 46    再在vim中运行命令:
 47    :settags=/home/nuoerll/vim71/tags
 48    该命令将tags文件加入到vim中来,你也可以将这句话放到~/.vimrc中去, 如果你经
 49    常在这个工程编程的话.
 50    对于经常在不同工程间编程,可以在.vimrc中设置:
 51        settags=tags;    //; 不能没有
 52        setautochdir
 53
 54(5). 使用例子
 55    把光标定位到某一函数名上,按下 Ctar + ], vim就可以自动切换到该函数定义处!
 56    要返回只需要按下Ctrl+ t .
 57    更多用法,在vim命令模式输入 :help usr_29 查看即可.
 58
 59
 60#=============================================================================
 613. TagList插件
 62(1). 帮助手册查看
 63    :helptaglist.txt
 64
 65(2). 功能
 66    高效地浏览源码,其功能就像vc中的workpace, 那里面列出了当前文件中的所有宏,
 67    全局变量,函数名等.
 68
 69(3). 安装
 70    下载taglist压缩包,然后把解压的两个文件taglist.vim 和 taglist.txt 分别放到
 71    $HOME/.vim/plugin和 $HOME/.vim/doc 目录中.
 72
 73(4). 使用方法
 74    首先请先在你的~/.vimrc文件中添加下面语句:
 75        letTlist_Ctags_Cmd='/bin/ctags // 若在windows中应写成: let/
 76                            Tlist_Ctags_Cmd='ctags.exe'
 77        letTlist_Show_One_File=1
 78        letTlist_OnlyWindow=1
 79        letTlist_Use_Right_Window=0
 80        letTlist_Sort_Type='name'
 81        letTlist_Exit_OnlyWindow=1
 82        letTlist_Show_Menu=1
 83        letTlist_Max_Submenu_Items=10
 84        letTlist_Max_Tag_length=20
 85        letTlist_Use_SingleClick=0
 86        letTlist_Auto_Open=0
 87        letTlist_Close_On_Select=0
 88        letTlist_File_Fold_Auto_Close=1
 89        letTlist_GainFocus_On_ToggleOpen=0
 90        letTlist_Process_File_Always=1
 91        letTlist_WinHeight=10
 92        letTlist_WinWidth=18
 93        letTlist_Use_Horiz_Window=0
 94
 95    
 96    此时用vim打开一个c源文件试试:
 97    $vim ~/vim/src/main.c
 98    
 99    进入vim后用下面的命令打开taglist窗口.
100    :Tlist
101
102    为了更方便地使用,可以在.vimrc文件中加入:
103        map<<span style="color:#6a5acd">silent
><<span style="color:#6a5acd">leader>tl:TlistToggle<<span style="color:#6a5acd">CR>
104    这样就可以用",tl"命令进行taglist窗口的打开和关闭之间方便切换了. // 这里
105    的","是我.vimrc设置的leader,你也可以设置成别的, 在.vimrc中修改即可, 如我
106    的:let mapleader=","
107        
108    
109 #=============================================================================
110 4. WinManager 插件
111 (1). 帮助手册查看
112    :helpwinmanager
113
114 (2). 功能
115    管理各个窗口,或者说整合各个窗口.
116
117 (3). 安装
118    下载WinManager.zip压缩包,解压后把*.vim文件放到 $HOME/.vim/plugin 目录中,
119    把*.txt文件放到$HOME/.vim/doc 目录中.
120
121 (4). 使用方法
122    在.vimrc中加入如下设置:
123    letg:winManagerWindowLayout='FileExplorer|BufExplorer //这里可以设置/
124    为多个窗口,如'FileExplorer|BufExplorer|TagList'
125    letg:persistentBehaviour=0            // 只剩一个窗口时, 退出vim.
126    letg:winManagerWidth=20
127    letg:defaultExplorer=1
128    nmap<<span style="color:#6a5acd">silent> <<spanstyle="color:#6a5acd">leader>fir:FirstExplorerWindow<<spanstyle="color:#6a5acd">cr>
129    nmap<<span style="color:#6a5acd">silent> <<spanstyle="color:#6a5acd">leader>bot:BottomExplorerWindow<<spanstyle="color:#6a5acd">cr>
130    nmap<<span style="color:#6a5acd">silent> <<spanstyle="color:#6a5acd">leader>wm :WMToggle<<spanstyle="color:#6a5acd">cr>
131
132 (5). 使用例子
133    在终端输入vim启动vim:
134    $vim
135    在正常模式下,敲入 ",wm" 即可看到,vim的左侧新建了两个窗口:FileExplorer和
136    BufExplorer,这样我们即可在FileExplorer窗口很方便地对目录进行查看, 编辑等
137    操作;在BufExplorer窗口中查看当前vim已经打开那些文件.
138
139
140 #=============================================================================
141 5. cscope
142 (1). 帮助手册查看
143    :helpif_cscop.txt
144
145 (2). 功能
146    用Cscope自己的话说- "你可以把它当做是超过频的ctags",其功能和强大程度可见
147    一斑吧,关于它的介绍我就不详细说了, 如果你安装好了前文介绍的帮助手册.
148
149 (3). 安装
150    如果是在linux环境中,cscope一般都会随系统一起安装了; 在windows环境中, 则需
151    要下载windows版本的(cscope.exe),然后把它放到path环境变量所设
152    置的目录中(如:C:/Program Files/Vim/vim72).
153
154 (4). 使用方法
155    在.vimrc中增加如下设置,就可以利用相应的快捷键进行不同的查找了.
156        ifhas("cscope")
157            setcscopetag   " 使支持用Ctrl+]  和 Ctrl+t快捷键在代码间跳来跳去
158             " checkcscope for definition of a symbol before checkingctags:
159             "set to 1 if you want the reverse search order.
160            setcsto=1
161
162            " addany cscope database in current directory
163             iffilereadable("cscope.out")
164                csadd cscope.out
165            " elseadd the database pointed to by environmentvariable
166             elseif$CSCOPE_DB !=""
167                csadd $CSCOPE_DB
168            endif
169
170            "show msg when any other cscope db added
171            setcscopeverbose
172
173            nmap<<span style="color:#6a5acd">C-/>s :cs find s<<span style="color:#6a5acd">C-R>=expand("")<<spanstyle="color:#6a5acd">CR><<spanstyle="color:#6a5acd">CR>
174            nmap<<span style="color:#6a5acd">C-/>g :cs find g<<span style="color:#6a5acd">C-R>=expand("")<<spanstyle="color:#6a5acd">CR><<spanstyle="color:#6a5acd">CR>
175            nmap<<span style="color:#6a5acd">C-/>c :cs find c<<span style="color:#6a5acd">C-R>=expand("")<<spanstyle="color:#6a5acd">CR><<spanstyle="color:#6a5acd">CR>
176            nmap<<span style="color:#6a5acd">C-/>t :cs find t<<span style="color:#6a5acd">C-R>=expand("")<<spanstyle="color:#6a5acd">CR><<spanstyle="color:#6a5acd">CR>
177            nmap<<span style="color:#6a5acd">C-/>e :cs find e<<span style="color:#6a5acd">C-R>=expand("")<<spanstyle="color:#6a5acd">CR><<spanstyle="color:#6a5acd">CR>
178            nmap<<span style="color:#6a5acd">C-/>f :cs find f<<span style="color:#6a5acd">C-R>=expand("")<<spanstyle="color:#6a5acd">CR><<spanstyle="color:#6a5acd">CR>
179            nmap<<span style="color:#6a5acd">C-/>i :cs find i^<<span style="color:#6a5acd">C-R>=expand("")<<spanstyle="color:#6a5acd">CR>$<<spanstyle="color:#6a5acd">CR>
180            nmap<<span style="color:#6a5acd">C-/>d :cs find d<<span style="color:#6a5acd">C-R>=expand("")<<spanstyle="color:#6a5acd">CR><<spanstyle="color:#6a5acd">CR>
181        endif
182
183 (5). 使用例子
184    首先进入源码目录,在linux终端中输入以下命令以创建cscope数据库:
185        $find ~/work/..Project/ -name "*.h" -o -name "*.cpp" >cscope.files
186        $cscope -bkq -i cscope.files
187    如果是在windows环境中,则换成如下命令:
188        dir/s /b *.cpp *.h > cscope.files
189        cscope-b -q -k -i cscope.files
190
191    然后,用vim打开一个源文件(如: vimmain.cpp),
192    打开后,第一件事就是导入cscope数据库了:
193        :csadd /home/yourname/workpace/cscope.out/home/yourname/workpace
194
195    cscope数据库导入成功后,就可以利用"步骤(4)"中定义的快捷键进行相关的查找,
196    浏览等操作了(当然也可以直接利用相关命令,嘿嘿).
197
198 #=============================================================================
199 5. c.vim 插件
200 (1). 帮助手册查看
201    helpcsupport
202
203 (2). 功能
204    C/C++-IDEfor Vim/gVim. 简单的说, 就是如果安装配置好后, vim/gvim就是一个
205    c/c++编程的一个IDE,其功能堪比windows里常用的vc.
206
207 (3). 安装
208    下载cvim.zip压缩包后,把压缩包copy到 $HOME/.vim 目录(windows下, copy到
209             C:/ProgramFiles/Vim/vimfiles)下解压, 即可.
210        unzipcvim.zip    //解压命令
211        
212 (4). 使用方法
213    安装好后就可以直接用了,具体例子看"使用例子".
214    
215 (5). 使用例子
216    在终端用vim打开一个c文件:
217        $vimhello.c
218    进入vim,敲入 "/im"即可发现一个main函数框架就这样快捷简单完美地写出.    
219
220    我比效常用的的操作有(第一列为命令,第二列为说明, 第三列为该命令所支持的模
221             式(n:普通模式,v:可视模式, i:插入模式):
222          --Help -----------------------------------------------
223          /hm      show manual for word under the cursor(n,i)
224          /hp      show pluginhelp                      (n,i)
225
226          --Comments -------------------------------------------
227          /cl      end-of-line comment                (n,v,i)
228          /cj      adjust end-of-line comment(s)      (n,v,i)
229          /cs      set end-of-line comment column      (n)
230          /c*      code -> comment               (n,v)
231          /cc      code -> comment //                  (n,v)
232          /co      comment ->code                    (n,v)
233          /cfr      framecomment                      (n,i)
234          /cfu      functioncomment                    (n,i)
235          /cme      methoddescription                  (n,i)
236          /ccl      classdescription                  (n,i)
237          /cd      date                                (n,v,i)
238          /ct      date /&time                        (n,v,i)
239
240          --Statements ------------------------------------------
241          /sd      do { while                        (n,v,i)
242          /sfo      for{                            (n,v,i)
243          /sife    if { else{                    (n,v,i)
244          /se      else {                            (n,v,i)
245          /swh      while{                          (n,v,i)
246          /ss      switch                              (n,v,i)
247
248          --Preprocessor -----------------------------------------
249          /p<      #include<>                        (n,i)
250          /p''      #include""                        (n,i)
251          /pd      #define                            (n,i)
252          /pu      #undef                              (n,i)
253          /pie      #if  #else#endif                  (n,v,i)
254          /pid      #ifdef#else#endif                (n,v,i)
255          /pin      #ifndef#else#endif                (n,v,i)
256          /pind    #ifndef #def#endif                (n,v,i)
257          /pi0      #if0#endif                        (n,v,i)
258          /pr0      remove#if 0#endif                (n,i)
259          /pe      #error                              (n,i)
260          /pl      #line                              (n,i)
261          /pp      #pragma                            (n,i)
262
263          --Idioms ------------------------------------------------
264          /if      function                            (n,v,i)
265          /isf      staticfunction                    (n,v,i)
266          /im      main()                              (n,v,i)
267          /i0      for( x=0;x              (n,v,i)
268          /in      for( x=n-1; x>=0; x-=1)            (n,v,i)
269          /ie      enum   +typedef                    (n,i)
270          /is      struct +typedef                    (n,i)
271          /iu      union  +typedef                    (n,i)
272          /ip      printf()                            (n,i)
273          /isc      scanf()                            (n,i)
274          /ica      p=calloc()                          (n,i)
275          /ima      p=malloc()                          (n,i)
276          /isi      sizeof()                            (n,v,i)
277          /ias      assert()                            (n,v)
278          /ii      open inputfile                    (n,i)
279          /io      open outputfile                    (n,i)
280
281          --Snippets ------------------------------------------------
282          /nr      read codesnippet                  (n,i)
283          /nw      write codesnippet                  (n,v,i)
284          /ne      edit codesnippet                  (n,i)
285          /np      pick upprototype                  (n,v,i)
286          /ni      insert prototype(s)                (n,i)
287          /nc      clear  prototype(s)                (n,i)
288          /ns      show   prototype(s)                (n,i)
289          /ntl      editlocaltemplates                (n,i)
290          /ntg      editglobaltemplates              (n,i)
291          /ntr      rebuildtemplates                  (n,i)
292
293          --C++ ----------------------------------------------------
294          /+co      cout  <<  <<endl;                  (n,i)
295          /+c      class                              (n,i)
296          /+cn      class(usingnew)                  (n,i)
297          /+ci      classimplementation                (n,i)
298          /+cni    class (usingnew) implementation    (n,i)
299          /+mi      methodimplementation              (n,i)
300          /+ai      accessorimplementation            (n,i)
301
302          /+tc      templateclass                      (n,i)
303          /+tcn    template class (usingnew)          (n,i)
304          /+tci    template classimplementation      (n,i)
305          /+tcni    templateclass (usingnew) impl.    (n,i)
306          /+tmi    template methodimplementation      (n,i)
307          /+tai    template accessorimplementation    (n,i)
308
309          /+tf      templatefunction                  (n,i)
310          /+ec      error class                        (n,i)
311          /+tr      try...catch                      (n,v,i)
312          /+ca      catch                              (n,v,i)
313          /+c.      catch(...)                          (n,v,i)
314
315          --Run ---------------------------------------------------
316          /rc      save andcompile                    (n,i)
317          /rl      link                                (n,i)
318          /rr      run                                (n,i)
319          /ra      set comand linearguments          (n,i)
320          /rm      runmake                            (n,i)
321          /rg      cmd. line arg. formake            (n,i)
322          /rp      runsplint                          (n,i)
323          /ri      cmd. line arg. forsplint          (n,i)
324          /rk      run CodeCheck (TM)                  (n,i)
325          /re      cmd. line arg. for CodeCheck(TM)  (n,i)
326          /rd      runindent                          (n,v,i)
327          /rh      hardcopybuffer                    (n,v,i)
328          /rs      show pluginsettings                (n,i)
329          /rx      set xtermsize                      (n,only Linux/UNIX & GUI)
330          /ro      change outputdestination          (n,i)
331                
332    关于此插件的更多功能和各种说明,请查看帮助手册, help csupport.
333
334            
335 #=============================================================================
336 6. omnicppcoplete 插件
337 (1). 帮助手册查看
338    :helpomnicppcoplete
339 (2). 功能
340    实现像vc那样的代码自动补全功能,比如 this-><<spanstyle="color:#6a5acd">Ctrl+X><<spanstyle="color:#6a5acd">Ctrl+O> 后, 将出现一个
341    提示框,其中包含了this指针所有可以接收的函数或数据成员等.
342 (3). 安装
343    把下载下来的omnicppcoplete-0.41.zip 压缩包copy到 $HOME/.vim/(windows 复
344             制到C:/Program Files/Vim/vimfiles ), 然后解压, 即可.
345 (4). 使用方法
346    在.vimrc中添加以下两条语句:
347        setnocp   "不兼容vi
348         filetypepluginon  "开启文件类型识别功能
349    进入c++源码目录,在终端执行命令 ctags -R --c++-kinds=+p --fields=+iaS
350    --extra=+q.
351 (5). 使用例子
352    编写c++代码时,如要自动补全, 敲入 Ctrl+X Ctrl+O, 即可在出现的提示框中用
353    Ctrl+N选择符合要求的.
354
355
356 #=============================================================================
357 7. a.vim插件
358 (1). 帮助手册查看
359    这个插件没有帮助手册,不过大可放心使用, 其提供的功能也不是很多, 就几条命令
360    ,但是用起来真的是很方便.
361 (2). 功能
362    在.h 和 .c/.cpp 文件中切换. (英文原句 "A few ofquick commands to swtich
363             betweensource files and header files quickly.")
364 (3). 安装
365    把下载到的a.vim插件放到$HOME/.vim/plugin 目录下, 即可.
366 (4). 使用方法
367    只要在vim中输入以下命令即可完成相应的功能:
368        :Aswitches to the header file corresponding to the current filebeing
369            edited(or vise versa)
370        :ASsplits and switches
371        :AVvertical splits and switches
372        :ATnew tab and switches
373        :ANcycles through matches
374        :IHswitches to file under cursor
375        :IHSsplits and switches
376        :IHVvertical splits and switches
377        :IHTnew tab and switches
378        :IHNcycles through matches
379        <<spanstyle="color:#6a5acd">Leader>ih switches to file undercursor
380        <<spanstyle="color:#6a5acd">Leader>is switches to the alternatefile of file under cursor(e.g.
381                 on  switches to foo.cpp)
382        <<spanstyle="color:#6a5acd">Leader>ihn cycles through matches
383
384 #=============================================================================
385 8. VisualMark.vim插件
386 (1). 帮助手册查看
387    这个插件没有帮助手册,不过大可放心使用, 其提供的功能也不是很多, 就几条命令
388    ,但是用起来真的是很方便.
389 (2). 功能
390    高亮书签.
391 (3). 安装
392    把下载好的VisualMark.vim插件放到$HOME/.vim/plugin 目录下, 即可.
393 (4). 使用方法
394    只要在vim中执行以下命令即可完成相应的功能:
395         1.  For gvim, use"Ctrl + F2" totoggle a visual mark.
396            For both vim and gvim, use "mm" to toggle a visualmark.
397         2.  Use"F2" tonavigate through the visual marks forward in the
398        file.
399         3.  Use"Shift + F2" tonavigate backwards.
400
401 #=============================================================================
402 9. Mark.vim插件
403 (1). 帮助手册查看
404    这个插件没有帮助手册, 不过大可放心使用, 其提供的功能也不是很多, 就几条命
405    令, 但是用起来真的是很方便.
406
407 (2). 功能
408    这个插件与vim中自带的'*'与'#'非常相像. 不同之处是:vim中的'*'与'#'命令只
409    能同时高亮一个同类词组(或正则表达式的搜索结果),而Mark.vim插件可以同时高
410    亮多个.
411
412 (3). 安装
413    把下载好的Mark.vim插件放到$HOME/.vim/plugin 目录中, 即可.
414
415 (4). 使用方法
416    /m      markor unmark the word under (orbefore) the cursor
417    /r      manuallyinput a regular expression. 用于搜索.
418    /n      clearthis mark (i.e. the mark under thecursor), or clear all
419            highlightedmarks .
420    <--> //).
635    " ,cl          "Same cc, 并且左对齐.
636    " ,cb          "Same cc, 并且两端对齐.
637    " ,cu          "Uncomments the selected line(s).
638
639
640 #=============================================================================
641 16.sketch.vim  用鼠标作画
642 map <<spanstyle="color:#6a5acd">silent> <<spanstyle="color:#6a5acd">leader>ske :callToggleSketch()<<span style="color:#6a5acd">CR>
643
644
645
646
647 #=============================================================================
648 17. Calendar.vim
649 map <<spanstyle="color:#6a5acd">silent> <<spanstyle="color:#6a5acd">leader>cal :Calendar<<spanstyle="color:#6a5acd">cr>
650 map <<spanstyle="color:#6a5acd">silent> <<spanstyle="color:#6a5acd">leader>cah :CalendarH<<spanstyle="color:#6a5acd">cr>
651
652
653
654 #=============================================================================
655 18.DoxygenToolkit.vim
656 (1). 代码文档工具
657 letg:DoxygenToolkit_commentType = "C"
658 letg:DoxygenToolkit_briefTag_pre="@Synopsis  "
659 letg:DoxygenToolkit_paramTag_pre="@Param"
660 letg:DoxygenToolkit_returnTag="@Returns  "
661 letg:DoxygenToolkit_blockHeader="--------------------------------------------------------------------------"
662 letg:DoxygenToolkit_blockFooter="----------------------------------------------------------------------------"
663 letg:DoxygenToolkit_authorName="Mathias Lorente"
664 letg:DoxygenToolkit_licenseTag="Myown license"
665
666
667
668 #=============================================================================
669 19. cpp.vim
670 (1). c/c++类名, 函数等高亮
671 install details
672 Make a backup copy ofsyntax/vim.cpp and overwrite syntax/vim.cpp with this file.
673
674
675
676 #=============================================================================
677 20. javacomplete.vim
678 (1). 帮助手册查看
679    :helpjavacomplete.txt
680 (2). 功能
681    进行java类,包, 方法等补全.
682 (3). 安装
683     1. 下载,解压, 把相应的文件copy到相应的目录下.
684     2. 对Reflection.java进行编译,编译命令为:
685        javac-source 1.4 Reflection.java
686     3. 把编译生成的Reflection.class文件移动到vim的$HOME目录下.(注意是移动,而
687            不是复制,最好保证系统中只有一个Reflection.class文件, 且在vim的
688            $HOME目录下.)
689     4. 在.vimrc中加入:
690        setlocalcompletefunc=javacomplete#CompleteParamsInfo
691        autocmdFileType c set omnifunc=ccomplete#Complete
692        autocmdFileType css set omnifunc=csscomplete#CompleteCSS
693        autocmdFileType html set omnifunc=htmlcomplete#CompleteTags
694        autocmdFileType java set omnifunc=javacomplete#Complete
695        autocmdFileType javascript setomnifunc=javascriptcomplete#CompleteJS
696        autocmdFileType php set omnifunc=phpcomplete#CompletePHP
697        autocmdFileType python set omnifunc=pythoncomplete#Complete
698        autocmdFileType xml set omnifunc=xmlcomplete#CompleteTags
699 (4). 使用方法
700 (5). 使用例子
701    Math.<<span style="color:#6a5acd">C-X><<spanstyle="color:#6a5acd">C-O>
702
703
704
705 #=============================================================================
706 21.JumpInCode_Plus.vim
707 (1). 帮助手册查看
708    http://www.vim.org/scripts/script.php?script_id=2862
709
710 (2). 功能
711    <<spanstyle="color:#6a5acd">leader>jc  Generatetags and cscope database from current directory to :
712                  CurrentDirectory/OutDB/cscope.out,tags
713    <<spanstyle="color:#6a5acd">leader>jst      list existed tags full name and choose tags
714    <<spanstyle="color:#6a5acd">leader>jsc      listexisted cscope database full name and choose cscope.out
715
716 (3). 安装
717    把JumpInCode_Plus.vim放到 $VIM/vimfiles/plugin
718
719 (4). 使用方法
720 (5). 使用例子
721
722
723
724 #=============================================================================
725 22. txtbrowser.zip
726 (1). 帮助手册查看
727    http://www.vim.org/scripts/script.php?script_id=2899
728    http://guoyoooping.blog.163.com/blog/static/1357051832009112910162389/
729    :helptxtbrowser
730
731 (2). 功能
732      show the document map and syntax highlight in plain text.
733
734 (3). 安装
735    :helptxtbrowser
736     1. 请首先安装taglist插件(http://www.vim.org/scripts/script.php?script_id=273),
737    我相信玩Vim的没有几个人没有安装这个插件吧.
738
739     2. 下载插件后解压缩到目录$HOME/.vim(或$HOME/vimfiles,$VIM/vimfiles). 然后将解压后
740    的.ctag,剪切到$HOME目录下即可, 安装完成后你的文件夹下应该有下面的几个文件(请
741     注意目录结构):
742        $HOME/.ctags- 用于标题标签的生成.
743        $HOME/.vim/syntax/txt.vim- .txt文件的语法高亮文件.
744        $HOME/.vim/plugin/txtbrowser.vim- 浏览工具.
745        $HOME/.vim/doc/txtbrowser.txt- 英文帮助文档.
746        $HOME/.vim/doc/txtbrowser.cnx- 中文帮助文档.(别忘了打开然后执行
747                           ":helptags."生成标签)
748    由于版本1.1.1之前采用老的插件名,请在安装前先删除低版本插件(主要是帮助文件, 原来的
749     名字叫txt.txt和txt_cn.txt),否则在安装新的帮助文档时会提示标签已经存在..
750
751     3. 在你的.vimrc文件里加入下面三行,然后重启你的Vim:
752        syntaxon
753        lettlist_txt_settings = 'txt;c:content;f:figures;t:tables'
754        auBufRead,BufNewFile *.txt setlocal ft=txt
755
756     4. 本插件所有文件以fenc=utf8发布.签于taglist对中文的支持有限, 你需要保证你的文
757    档的enc值和fenc的值相等(例如,enc=cp936, fenc=cp936). 如果不等请将fenc的值设为
758    相应的enc的值保(如:setfenc=cp936)存后并刷新(:TlistUpdate).
759
760 (4). 使用方法
761    :helptxtbrowser
762 (5). 使用例子
763
764
765
766 #=============================================================================
767 23.  FindMate.vim
768 (1). 帮助手册查看
769    helpFindMate
770    http://www.vim.org/scripts/script.php?script_id=2871
771
772 (2). 功能
773    快速查找文件
774
775 (3). 安装
776    下载FindMate压缩包,然后把解压的两个文件FindMate.vim 和 FindMate.txt 分别放到
777    $HOME/.vim/plugin和 $HOME/.vim/doc 目录中.
778
779 (4). 使用方法
780        Youcan launch FindMate by typing:
781              ,,File_name
782        Or
783              :FindMateFile_name
784        Theshortcut can be redefined by using:
785              mapyour_shortcut   <<spanstyle="color:#6a5acd">Plug>FindMate
786        Inyour .vimrc file
787
788 (5). 使用例子
789
790
791
792
793 #=============================================================================
794 24. ZoomWin.vim
795 (1). 帮助手册查看
796    http://www.vim.org/scripts/script.php?script_id=508
797
798 (2). 功能
799    Press<<span style="color:#6a5acd">c-w>o : the current windowzooms into a full screen
800    Press<<span style="color:#6a5acd">c-w>o again: the previousset of windows is restored
801
802 (3). 安装
803    Press<<span style="color:#6a5acd">c-w>o : the current windowzooms into a full screen
804    Press<<span style="color:#6a5acd">c-w>o again: the previousset of windows is restored
805
806 (4). 使用方法
807 (5). 使用例子
808
809
810
811 #=============================================================================
812 25. cpp_src.tar.bz2
813    tagsfor std c++ (STL, streams,...) : Modified libstdc++ headers for usewith ctags
814 (1). 帮助手册查看
815    http://www.vim.org/scripts/script.php?script_id=2358
816
817 (2). 功能
818 (3). 安装
819    installdetails:
820     1. unpack
821     2. run
822        $ctags -R --c++-kinds=+p --fields=+iaS --extra=+q--language-force=C++ cpp_src
823        $mv tags cpp # or whatever
824     3. InVim:
825        settags+=/my/path/to/tags/cpp
826
827 (4). 使用方法
828 (5). 使用例子
829
830
831
832
833 #=============================================================================
834 26. grep.vim
835 (1). 帮助手册查看
836    http://www.vim.org/scripts/script.php?script_id=311
837
838 (2). 功能
839    Thegrep plugin integrates the grep, fgrep, egrep, and agrep toolswith
840    Vimand allows you to search for a pattern in one or more files andjump
841    tothem.
842
843 (3). 安装
844     1).
845    Touse this plugin, you need the grep, fgrep, egrep, agrep, findand
846    xargsutilities. These tools are present in most of the Unixinstallations.
847    ForMS-Windows systems, you can download the GNU grep and findutilities
848    fromthe following sites:
849      http://gnuwin32.sourceforge.net/packages/grep.htm
850      http://gnuwin32.sourceforge.net/packages/findutils.htm 
851     2).
852    把下载得到的grep.vim复制到$HOME/plugin 目录中.
853
854 (4). 使用方法
855    :Grep
856
857 (5). 使用例子
858
859 #=============================================================================
860 27. autocomplpop.zip
861 (1). 帮助手册查看
862    :helpacp
863    http://www.vim.org/scripts/script.php?script_id=1879
864
865 (2). 功能
866    Withthis plugin, your vim comes to automatically opens popup menufor
867    completionswhen you enter characters or move the cursor in Insert mode.It
868    won'tprevent you continuing entering characters.
869
870 (3). 安装
871    autocomplpop.zip
872    mvplugin/acp.vim $HOME/.vim/plugin/acp.vim
873    mvautoload/acp.vim $HOME/.vim/autoload/acp.vim
874    mvdoc/acp.jax $HOME/.vim/doc/acp.jax
875    mvdoc/acp.txt $HOME/.vim/doc/acp.txt
876    
877 (4). 使用方法
878    Oncethis plugin is installed, auto-popup is enabled at startup bydefault.
879    Whichcompletion method is used depends on the text before the cursor.The
880    defaultbehavior is as follows:
881        kind      filetype    textbefore the cursor ~
882        Keyword           two keyword characters
883        Filename           a filename character + a path separator
884                               +0or more filename character
885        Omni      ruby        ".","::" ornon-word character + ":"
886                              (|+ruby|required.)
887        Omni      python      "."(|+python|required.)
888        Omni      xml        "<</strong>","</</strong>"or("<" + non-">" characters + "")
889        Omni      html/xhtml  "<</strong>","</</strong>"or("<" + non-">" characters + "")
890        Omni      css        (":", ";", "{", "^", "@", or"!")
891                               +0or 1 space
892
893 (5). 使用例子

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值