Show tex section list in vim

186 views Asked by At

I like to use vim for tex file editing.

My document is lengthy, so I hope to show a list of section or subsection and navigate by just typing enter on the section name.

Please let me know some good plug-in or setting.

I know taglist plug-in shows a method list when editing Java source code, but it does not work for tex file.

3

There are 3 answers

0
romainl On BEST ANSWER

You only need the built-in :global command:

:g/\\.*section{/#

and, possibly, a simple custom mapping:

nnoremap <key> :g/\\.*section{/#<CR>:

type a line number followed by <CR> to jump to the desired line.

0
Light Yagmi On

I found latex-box has the feature what I really want.

0
lcd047 On

See this gist. Save it as a file $HOME/.ctags on UNIX or $HOME/ctags.cnf on Windows. It allows ctags to make references to everything interesting in LaTeX files.