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.
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
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.
I've written a Python script that searches directories (with optional filters) and creates a file containing the paths.
Leave a comment