Re: [Vim-latex-devel] label viewing
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sr...@fa...> - 2003-01-16 23:52:20
|
I just cooked up something which shows what I mean... Note that this is still a very basic version which doesn't have the syncing capability of compiler.vim... Eventually, we would like to make the quickfix window (in this case, the '--Label Browser---' window) sync with the appropriate tex window in preview mode... I am attaching a file called labelbrowser.vim. Place that in your ftplugin/tex/ directory and then when you either type \ref{ or press <F9> in normal mode, a window with the \label matches is shown... (You must have some tex files containing \label's in the directory of the file being edited). On Thu, 16 Jan 2003, Mikolaj Machowski wrote: > Great :) The idea to use quickfix is wonderful but I have to read > something about it. Also I don't like to use IMAP here. quickfix and > preview are some kind "agressive". Making it appears automagically... I am including this agressive behavior :) just now just to show its possible. Eventually, we might make this an option which is disabled by default... > I wouldn't like this behaviour. Also mapping this to some key (let's say > <F9>) make it easier to react on prefix (write \ref{fig and you will see only > \labels for figures). This key will be "lost" but it is possible to make Thats a cool idea... Infact, I think instead of both of us just getting our hands dirty and implementing something fast, we should discuss it like this... A really professional way to approach things like this is to write the documentation first... Here's my shot: ============================================================================== Label Browser *latex-suite-label-browser* This functionality is available via the Tex-Suite.Label menu or the :TLabel command. While editing a latex file, if you press <F9> after typing \ref{, latex-suite opens up a '--Label-Browser--' window. This window contains a list of \label's found in all the tex files found in the directory containing the present file being edited. Just below this window, a |preview-window| of the tex file containing the label is shown so you can get some context. Pressing <F9> while the label browser is being shown makes the cursor jump to the label browser window. Pressing <enter> on an item in this window inserts the corresponding label in the corresponding latex file. Moving up and down in the label browser window automatically syncs the preview window's display. If you press <F9> after something like '\ref{pat' then only labels starting with 'pat' will be shown. This is useful to narrow down references if you follow a consistent labeling scheme. See |ls-maps-label-browser| for how to customize the mapping for this functionality. See |ls-options-label-browser| for various options which affect the behavior ============================================================================== I still haven't written the |ls-options-label-browser| part of it :). In the meanwhile, you are welcome to add to the help suggest new modes of behavior etc... Srinath |