sudo apt-get install exuberant-ctags
--python-kinds=-iv --exclude=build --exclude=dist
The first line turns off tags generation for variables and imports. The second and third lines turn off generation of tags in the named folders, since you almost certainly want to ignore source code in those directories.
To build tags for all files in the current folder and sub-folders:
ctags -R ctags -a -R ~/dev/modules/my-python-app/
In the example above
-a appends to the current
To build tags for all the
java files in the current folder:
ctags -R . ctags -a -R ~/dev/web/modules/region/
The default command will create a file called
tags. This is the
vim will look for.
Case insensitive tag matching¶
.vimrc requests case-insensitive searching by setting
ic), then the above tag matching will also be case
insensitive. This is irksome, because searching for the definition of
.matrix will present you with a menu asking you to choose between
.matrix and class
Matrix, rather than just jumping to the
To fix this, add this to your
map <silent> <c-]> :set noic<cr>g<c-]>:set ic<cr>
This maps your Ctrl ] key to turn off case-insensitivity while it does the jump to tag, then turn it back on again. Now pressing Ctrl t will jump directly to your property, only presenting menus on the occasion when the tag you search for is defined in more than one place using precisely the same name.
:tag <tagname> jump to a tag. Ctrl ] jump (after positioning the cursor over a tag) g Ctrl ] jump (or list if more than one match) pop come back from a tag jump. Ctrl t " :ts list matches and allow user to select. :tags list the contents of the tag stack? vim -t DispPageDialog open the file and find the tag