vimctags

How to browse built-in python source code using ctag?


I created a ctag file in my project path:

/home/zen/zen_project

And I can function jump easily into this project.

But however, when I want to jump to builtin module methods(or installed under sys path), such as tornado. I can't do it.

I tried built another tag file in tornado path, but that only enable jumps between tornado files themselves. I still can't jump from my project files to tornado files.

Is it possible to do such jump using vim and ctag, how to do it?


Solution

  • You should have one tags file in your project root, and an additional one in your Tornado root. With the default value of the 'tags' option, Vim will pick up the files in your current directory, and in the current file's.

    You need to explicitly any other locations to it, e.g. by putting this into your ~/.vimrc:

    :set tags+=/path/to/tornado/tags
    

    To check which tag files are considered, you can use:

    :echo tagfiles()