$ sudo apt-get install exuberant-ctags2. 下載taglist後,將plugin及doc複製到家目錄的.vim
$ unzip taglist_46.zip $ mkdir /home/allen/.vim $ mv /home/allen/Downloads/taglist_46/plugin/taglist.vim /home/allen/.vim/pluginhttp://www.vim.org/scripts/script.php?script_id=273
3. 設定F9去啟動taglist功能.
$ vim .vimrc map <F9> :Tlist<CR>4. 產生ctags關聯檔
$ find . -name *."[ch]" > ctags.files $ ctags -L ctags.files5. HOW TO USE WITH VI
Vi will, by default, expect a tag file by the name "tags" in the current directory. Once the tag file is built, the following commands exercise the tag indexing feature: vi −t tag Start vi and position the cursor at the file and line where "tag" is defined. :tags Trace all tags :ta tag Find a tag. Ctrl-] Find the tag under the cursor. Ctrl-T Return to previous location before jump to tag (not widely implemented).6. 參考來源
http://ctags.sourceforge.net/ctags.html
沒有留言:
張貼留言