autotag.vim 已加载但显示没有标签文件
我通过 .vimrc 中的源代码安装了 autotag.vim。它列在 :scriptnames
中。
当我尝试使用 Ctrl+]
跳转到标签时,它显示
No tags file
tag not found: [function name]
如果我从命令行运行 ctag *.c
,那么我可以搜索标签。知道为什么吗?
我使用的是 Ubuntu 11.04 x64,这里是 :version
输出
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Mar 24 2011 07:07:02)
Included patches: 1-35
Modified by [email protected]
Compiled by buildd@
Huge version without GUI. Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope
+cursorbind +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +gettext
-hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape +mouse_dec
+mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra -perl +persistent_undo +postscript
+printer +profile +python/dyn +python3/dyn +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore
+wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wall -g -O2 -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,--as-needed -o vim -lm -lncurses -lselinux -lacl -lgpm
I installed autotag.vim by source it in .vimrc. It is listed in :scriptnames
.
When I tried to jump to tags using Ctrl+]
, it says
No tags file
tag not found: [function name]
If I run ctag *.c
from command line, then I can search for tags. Any idea why?
I'm on Ubuntu 11.04 x64 and here is a :version
output
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Mar 24 2011 07:07:02)
Included patches: 1-35
Modified by [email protected]
Compiled by buildd@
Huge version without GUI. Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope
+cursorbind +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +gettext
-hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape +mouse_dec
+mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra -perl +persistent_undo +postscript
+printer +profile +python/dyn +python3/dyn +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore
+wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wall -g -O2 -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,--as-needed -o vim -lm -lncurses -lselinux -lacl -lgpm
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定我是否理解你的问题。
AutoTag 不会创建
tags
文件,它只能更新现有的文件。为了使 AutoTag 可靠地工作,您需要一个与当前文件处于同一级别或父级(例如项目的主目录中)的
tags
文件。I'm not sure I understand your question.
AutoTag doesn't create a
tags
file, it can only update an existing one.For AutoTag to work reliably you'll need a
tags
file at the same level of the current file or in a parent (like in the main directory of your project).