Your browser does not support JavaScript!
Upvotes Anonymous 0 User 0

How to generate etags for a huge project in Spacemacs on Windows

One of the first things I noticed when generating etags for a large project was that a huge TAGS file was being created. It made tag operations (like searching) slow in Emacs.
How can I generate a small tags file?
We can create a file that contains file paths, e.g.:
c:/myproject/file1.js
c:/myproject/lib/file2.js
c:/myproject/lib/file3.js
and then pass that file to ctags.exe, using the -L argument:
ctags.exe -e -L inputfiles.txt -f outputtags.txt
-e  Generate Emacs tags
-L <file>  Pass in a file containing file paths (that will be the input files for ctags.exe)
-f <file>  The output tags file

This allows us to specify each file that will be tagged. If the project is really huge, we can even create separate tags files. The command above shows how to create a tags file with a different output filename.
Is there an easy way to create the input file?
I've written a Python script that searches directories (with optional filters) and creates a file containing the paths. 
Was this helpful?

Comments

Leave a Comment

I agree to the Terms of Service
Design © 2015, Downranked, LLC.,
Original user code contributions under MIT License