Daniel YC Lin
Daniel YC Lin

Reputation: 16042

Is there a plugin to show outline of rst in vim

Is there a way to show outline of rst files in vim? That could let me jump to section faster.

I would like it provide function like nerdtree. It would better to show on another separate window.

Or, if there any method to fold RST file?

Upvotes: 3

Views: 1564

Answers (3)

Vivian De Smedt
Vivian De Smedt

Reputation: 1029

I'm using tagbar together with rst2ctags

and the following settings in my _vimrc (gVim) or in my init.vim (NeoVim):

" ReStructuredText support in tagbar
let g:tagbar_type_ReStructuredText = {
  \ 'ctagstype': 'rst',
  \ 'ctagsbin' : 'rst2ctags.exe',
  \ 'ctagsargs' : '-f - --sort=yes',
  \ 'kinds' : [
    \ 's:sections',
    \ 'i:images'
  \ ],
  \ 'sro' : '|',
  \ 'kind2scope' : {
    \ 's' : 'section',
  \ },
  \ 'sort': 0,
\ }

Upvotes: 0

Andrew-Dufresne
Andrew-Dufresne

Reputation: 5624

You should try Voom. It is stable and works perfectly with reST and several other formats. I also use it to see outline of my Python scripts.

Upvotes: 3

Owen
Owen

Reputation: 39366

There is DotOutlineTree. I have had good experiences with it.

Upvotes: 2

Related Questions