On 10/07/13 15:33, Javier Mediavilla Vegas wrote:
Hi,
I want to extrack tags from files like :helptags does. The problem is that 
:helptags can only work with .txt and .??x files. I want to do it for a file 
with any file extension.
I have tried with ctags and defining my own language extension. Nevertheless, 
when two tags are in the same line, ctags only matches the first one.

Example:
    *E101* *E102*

ctags will extract "E101" without extracting E102. I think this should be able 
to be done with ctags because in C language you can define two functions in the same line

Example:
int add(void){return 5;} void some(void){}

and ctags extract both of them althouth they are in the same line.

The last change I take into account is to modify "helptags" function in the source code, that has 
".txt" and "??x" files hardcoded.

Any idea how to achieve this without touching source code?

Thanks in advance,
Javier.


To use tags, you need to have a tags file containing the proper information. For C and a number of other languages, Exuberant Ctags can do it. I notice the following paragraph near the end of the manpage for that particular ctags program:

Credit is also due Bram Moolenaar <[email protected]>, the author of vim, who has devoted so much of his time and energy both to developing the editor as a service to others, and to helping the orphans of Uganda.

Just program as you normally would, then run Exuberant Ctags on your source.

For Vim helpfiles, Vim can also generate the tags file itself (see :help :helptags). If you want to write documentation in any filetype that suits your fancy, and still use |bars| and *stars* as in Vim documentation, you may have to give appropriate options to Exuberant Ctags to tell it that "these files are Vim helpfiles even though their names don't end in .txt". If you didn't (yet) succeed at it, maybe there's a parameter you missed. If you have a Unix-like (including Linux, Cygwin, and, I think, Mac OSX) version of Exuberant Ctags, check its manpage (and, first, run "ctags --version": if it is Exuberant Ctags, it will proudly tell you).


Best regards,
Tony.
--
Reality is a cop-out for people who can't handle drugs.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to