Pandoctitude
is a Vim plugin that provides the proper attitude for working
with Pandoc-like documents: motions, text-objects, and syntax highlighting for
Pandoc mode.
gG
: Report header hierarchy at current location.[[
: Move to previous header (of any level) (for{count
} repeats).]]
: Move to next header (of any level) (for{count
} repeats).[=
: Move to previous sibling header (for{count
} repeats).]=
: Move to next sibling header (for{count
} repeats).[.
: Move to header of current section.[-
: Move to parent header of current section (for{count
} repeats).{count}[_
: Move to previous line with header-level of{count}
.{count}]_
: Move to next line with header-level of{count}
.
:Toc
: Produce a table-of-contents in the location list.
If you are unhappy with the default key-mappings you can provide your own by
defining custom mappings in your .vim/after/ftplugin/pandoc.vim
. For
example to replicate the default mappings, you would define the following:
map <buffer> gG <Plug>(PandoctitudeEchoLocation)
map <buffer> [[ <Plug>(PandoctitudeMoveToPreviousHeader)
map <buffer> ]] <Plug>(PandoctitudeMoveToNextHeader)
map <buffer> [= <Plug>(PandoctitudeMoveToPreviousSiblingHeader)
map <buffer> ]= <Plug>(PandoctitudeMoveToNextSiblingHeader)
map <buffer> [. <Plug>(PandoctitudeMoveToCurrentHeader)
map <buffer> [- <Plug>(PandoctitudeMoveToParentHeader)
map <buffer> [_ <Plug>(PandoctitudeMoveToPreviousAbsoluteHeaderLevel)
map <buffer> ]_ <Plug>(PandoctitudeMoveToNextAbsoluteHeaderLevel)
$ cd ~/.vim/bundle
$ git clone git://github.com/jeetsukumaran/vim-pandoctitude.git
:BundleInstall jeetsukumaran/vim-pandoctitude
Add the line below into your .vimrc.
Bundle 'jeetsukumaran/vim-pandoctitude'
Pandoctitude uses code modified from the following:
https://github.com/plasticboy/vim-markdown.git
https://github.com/vim-pandoc/vim-pandoc.git