Ctags information for built-in functions in PHP / Python / Etc

Is there any way to get ctags to support the built-in functions provided by PHP / Python (or whatever I'm currently working with), so that I can also use them in Source Explorer in vim and so on?

Update:

Ok, so with python, I can just run ctags in the source folder to get the tag file with built-in functions, although it does not seem to work with PHP, however the PHP source files contain lines like the following:

/* {{{ proto resource mysql_connect([string hostname[:port][:/path/to/socket] [, string username [, string password [, bool new [, int flags]]]]])

So, if I could somehow parse this with ctags, I would get the appropriate functions in my tag file. I tried using --regex-C to get it, but the following does not seem to work.

--regex-C='/\/\* \{\{\{ proto ([^ ]+) ([^ (]*)/\2/f/'

Any idea how to make this work?

Also with python, I seem to get the line of class ClassName: "with classes, is there any way to enable the init function for this ?

Update: I am just creating a separate question for PHP, thanks for the answers.

+5
source share
2 answers

ctagsallows you to create a database of tags step by step using the option --append; if you want the C definition for Python routines (a little? a little?) implemented directly in C, and some in Python itself), you can run:

ctags -R
ctags --append -R /path/to/python-source

If you want to include only part of the Python source code, you can specify this part; as you said in your comment, Lib/this is the place to run :)

ctags -R
ctags --append -R /path/to/python-source/Lib

, ( ) C , API .

; cscope, gid, ctags. ctags vim, gid script.

+2

ctags python, , python .

, this.

+1

All Articles