Sunday, September 14, 2014

Re: helptags

On 14/09/14 03:01, Dylan Doolittle wrote:
> I want to create text files that are tagged and linked to each other just like vim help files (see http://vim.wikia.com/wiki/Browsing_programs_with_tags). I am not the first who wants to do this, see http://vim.wikia.com/wiki/Add_your_note_files_to_Vim_help or http://vim.1045645.n5.nabble.com/making-your-own-tagfile-td1191896.html or http://ctags.sourceforge.net/EXTENDING.html or http://pnotepad.org/docs/howto/tag_custom_languages/ but the two commonly accepted solutions don't work for me: (1) Learn how to define a new language in ctags, which is beyond my skill; and (2) just write your text files as part of vim help and compile using the :helptags command.
>
> I know enough ctags that I can run a command like this in a directory with all my text files:
>
> ctags -R --langdef=mynotes --langmap=mynotes:.mnt --regex-salsa=/\\*\(.+\)\\*/\1/ .
>
> but --regex-salsa=/\\*\(.+\)\\*/\1/ is my concoction and doesn't really work. What does :helptags use? In emacs, it's really easy to find out what a command does. I don't know how to do this in vi. Under the hood, it must use a ctags command, but I can't find the source so that I can emulate it.
>

AFAIK, under the hood Vim does not invoke an external ctags utility, it
has its own tag searching routines in C code. Tags (destinations of
hotlinks) are defined IIUC as any word between asterisks, where words
are defined (I think) by the 'isk' setting in the modeline at the bottom
of $VIMRUNTIME/doc/help.txt

See also:
:help bars
$VIMRUNTIME/syntax/help.vim and in particular the entries for
helpHyperTextEntry at lines 22-30.

and if you have the Vim source: src/tag.c


Best regards,
Tony.
--
There was a young fellow named Bliss
Whose sex life was strangely amiss,
For even with Venus
His recalcitrant penis
Would never do better than t
h
i
s
.

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment