Vim Gtags插件

01.Gtags func:查看定義處數據庫

 

02.Gtags -r func:查看引用處vim

 

03.Gtags -s text:查看未被數據庫定義的tagsui

 

04.copen:打開quick fix顯示窗口spa

 

05.cclose:關閉quick fix顯示窗口code

 

06.cn:下一項blog

 

07.cp:上一項字符串

 

08.cl:列出查詢到的相關項class

 

09.ccN:到列表中第N個符號處基礎

 

10.Gtags -g pattern:搜索pattern指定的字符串file

 

11.Gtags -gie -pattern:-e選項能夠用於搜索’-‘字符,可是基礎搜索,沒有元字符,-i選項忽略大小寫,相似於grep的選項

 

12.GtagsCuorsor:取決於光標位置,要是在定義處,查詢其引用,要是在引用處,跳轉至其定義處,不然就是Gtags -s命令

 

13.Gtags -P text:查詢包含text的路徑名,Gtags -P後接/dir/爲列出叫作dir目錄下文件,後接\.h$列出全部的include文件

 

14.Gtags -f file:列出file裏的符號,Gtags -f %則列出當前文件的符號

 

15.vimrc裏用let Gtags_Auto_Map = 1開啓快捷鍵

 1 " Suggested map:
 2 if g:Gtags_Auto_Map == 1
 3     :nmap <F2> :copen<CR>
 4     :nmap <F4> :cclose<CR>
 5     :nmap <F5> :Gtags<SPACE>
 6     :nmap <F6> :Gtags -f %<CR>
 7     :nmap <F7> :GtagsCursor<CR>
 8     :nmap <F8> :Gozilla<CR>
 9     :nmap <C-n> :cn<CR>
10     :nmap <C-p> :cp<CR>
11     :nmap <C-\><C-]> :GtagsCursor<CR>
12 endif

 

16.Gtags除了‘-c -n -p -q -u -v’選項和長名選項不能使用外,其餘global的選項均可以使用

相關文章
相關標籤/搜索