Friday, September 30, 2011

Re: Link to part of the same file

On 30/09/11 19:04, Fernando Basso wrote:
> What would be a good way (if possible at all) to have vim link, say, a
> table of contents to each section? I use vim for taking all kinds of
> notes and that would be terrific.
>
> Thanks in advance.
>

It depends on the filetype (tables of contents are written very
differently in Vim helpfiles and in HTML, and they're implicit in
Wikimedia source) so you would have to code an ad-hoc filetype-dependent
function. Probably set it up in ~/.vim/after/ftplugin/<filetype>.vim
(replacing <filetype> by the filetype, and, on Windows only, .vim by
vimfiles), possibly with the bulk of the function code in some autoload
script.

See
:help after-directory
:help autoload


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
189. You put your e-mail address in the upper left-hand corner of envelopes.

--
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

No comments: