+ -
当前位置:首页 → 问答吧 → 针对vim没法自动更新tags文件的问题, 写了个插件, 欢迎大家试用

针对vim没法自动更新tags文件的问题, 写了个插件, 欢迎大家试用

时间:2009-11-25

来源:互联网

http://vim.sourceforge.net/scripts/s...script_id=2870

有问题就直接在这个帖子反馈吧~

=========================================================================

更新到0.2版, 移除了碍眼的ctags_delete.c, 用grep实现了同样的功能. 现在这玩意只依赖ctags, grep, tail, cut, sort这五个常用命令了.

无论是加载tags的速度还是自动更新的速度都大大提升.

我自己在linux下用的啥问题没有, 不知道windows下会怎样, 应该也没问题吧...

作者: kevinlei   发布时间: 2009-11-25

patch :P
引用:
--- help.vt 2009-11-24 23:35:56.243045110 +0800
+++ help.vt.fix 2009-11-24 23:42:38.047325473 +0800
@@ -14,23 +14,23 @@

If tags-file doesn't exist, it can create a null file automaticlly.

- Once tags loaded, buffer-write event will trigger a re-index operation
- of current file if current file is existed in tags.
+ Once tags are loaded, buffer-write event will trigger a re-index operation
+ on current file if current file exists in tags.

:OmniTagsUpdate {file1} {file2} ...

Update the tags-file loaded before, you can specify many files and use
wildcards(see ":h wildcards"), "wildignore" option(see "h: wildignore")
- also influences the result of parse wildcards.
+ also influences the result of wildcards parsing.

- If files not in tags yet, the plugin will add those file to tags, if
- files are already exists, the plugin will update them.
+ If files are not in tags yet, the plugin will add those files to tags, if
+ files already exist, the plugin will update them.

You can specify no files, for re-index all files that already indexed.

:OmniTagsUnload

- Just a oppsite of :OmniTagsLoad, usually need not call by human.
+ Just an opposite of :OmniTagsLoad, usually needs not be called by human.


READ SCRIPT HEADER FIRST.
@@ -38,4 +38,4 @@
install details
Just drop the script to ~/.vim/plugin.

-The plugin depends on ctags, install it at first.
\ No newline at end of file
+The plugin depends on ctags, install it first.

作者: lolilolicon   发布时间: 2009-11-25

marks!

作者: princelai   发布时间: 2009-11-25

引用:
作者: lolilolicon
patch :P
哈哈, 多谢多谢, 你帮了个大忙.

作者: kevinlei   发布时间: 2009-11-25

不错不错 试用中。。

作者: firefoxmmx   发布时间: 2009-11-25

不错,好东西!

作者: YZMSQ   发布时间: 2009-11-26

顶上去.

字数补丁.

作者: kevinlei   发布时间: 2010-03-29

强力关注。终端下的编辑器我就用VIM!!
话说,最近我感觉ctags在复杂的大项目里(如KDEPim之类的),对于KMime::Message::Ptr根本就无法定位,不知道跳到哪里去了。LZ有没有其他的定位插件推荐??

作者: dickeny   发布时间: 2010-03-29

引用:
作者: dickeny
强力关注。终端下的编辑器我就用VIM!!
话说,最近我感觉ctags在复杂的大项目里(如KDEPim之类的),对于KMime::Message::Ptr根本就无法定位,不知道跳到哪里去了。LZ有没有其他的定位插件推荐??
如果用ctags的话, 只能jump到KMime, 再jump到Message, 再jump到Ptr了...

或者可以搞个脚本实现这3次jump.

vim在代码分析这块还是赶不上source insight啊. 但是写代码的时候手不离键盘且有各种补全真是很爽.

作者: kevinlei   发布时间: 2010-03-29