Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (39 sloc) 1.51 KB
hasktags: a tool to generate tag files for vim and emacs
What is it for? A tag file is a index containing key items of your project such as
- function names
- module names
- data declarations
- ...
so that you can find / jump to them fast.
HOWTO (GENERATING TAG FILES):
ghc --make hasktags.hs
I've been using this bash function or something similar for a long time.
It may be cumbersome but works:
runHaskTagsVim() {
# use --etags instead of --ctags for emacs
hasktags --ignore-close-implementation --ctags .; sort tags
}
HOWTO (USING TAG FILES):
VIM: let tags+=tagifle " tags,TAGS is the default setting so probably you don't have to do anything
:tjump foo<tab> or such. See :h tags
NEdit:
Load the "tags" file using File/Load Tags File.
Use "Ctrl-D" to search for a tag.
XEmacs/Emacs:
Load the "TAGS" file using "visit-tags-table"
Use "M-." to search for a tag.
jedit:
There is a plugin
run test cases:
cd testcases; sh test.sh
history:
In the past this tool was distributed with ghc. I forked and added some
features. hasktags itself was moved out of the ghc repository. Then I only
verified that my fork finds at least as much tags as the one forked by Igloo.
related work (list taken from announce of lushtags:
https://github.com/bitc/lushtags
http://hackage.haskell.org/package/hasktags
http://kingfisher.nfshost.com/sw/gasbag/
http://hackage.haskell.org/package/hothasktags
http://majutsushi.github.com/tagbar/
and probably much more