Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
created 2002 · complexity basic · author Travis · version 6.0
I've started working with tomcat and many .jsp files. I find this trick to be very helpful.
find -name '*.jsp' -printf '%f\t%P\t1\n' |sort > jsp.tags
This will create a file called jsp.tags with tag entries for each .jsp file. Within Vim I use
Now I can to simple
:tag file.jsp to quickly switch between the many .jsp files.
sort utility will use the value of LC_COLLATE to sort according to your locale. This will give Vim issues. On Unix based systems, try
LC_COLLATE=C sort instead of plain
There's also the
:find command and the path-option, with which one can easily switch between files in arbitrary directories.
For example, if one sets
on a Unix system one can do ":find stdio.h" to jump to the stdio-header file.
Recursive search is also possible by using the double-star:
Vim will :find any file under the current sub directory.
:sfind (split find) to open the file in a new window.