Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

vim

ctags

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?

like image 461
Zen Avatar asked Oct 16 '25 13:10

Zen


1 Answers

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()
like image 133
Ingo Karkat Avatar answered Oct 18 '25 12:10

Ingo Karkat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!