星期二, 十一月 03, 2009

[Tools]生成python的vim跳转文件(tags):ptags.py

也许很多人不会注意到python的发行包下Tool/scripts的文件夹。
里面的ptags.py可以用来生成vim需要的tags(eptags.py for emacs)

[1]. To build tags for all python files in a directory the usage is something like:
ptags.py *.py

Hint 2: If you want to build tags for all python scripts in a folder hierarchy (say for some project) you can use:

find -X . -name \*.py -print | xargs ptags.py
These of course assume that you moved ptags.py to somewhere in your shell's $PATH.

Reference:
http://betabug.ch/blogs/ch-athens/569
http://coverage.livinglogic.de/Tools/scripts/ptags.py.html

没有评论: