X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/81a417ffbe1fc1a67ed28e9322690888e2f49160..a4780275ce62f08cf317fc54306199b27807a443:/ftplugin/mkd.vim?ds=inline diff --git a/ftplugin/mkd.vim b/ftplugin/mkd.vim index 27fd855..07f81db 100644 --- a/ftplugin/mkd.vim +++ b/ftplugin/mkd.vim @@ -341,14 +341,32 @@ function! s:MapNormVis(rhs,lhs) execute 'vn ' . a:rhs . ' :call VisMove(''' . a:lhs . ''')' endfunction -call MapNormVis(']]', 'b:Markdown_MoveToNextHeader') -call MapNormVis('[[', 'b:Markdown_MoveToPreviousHeader') -call MapNormVis('][', 'b:Markdown_MoveToNextSiblingHeader') -call MapNormVis('[]', 'b:Markdown_MoveToPreviousSiblingHeader') + +call MapNormVis('(Markdown_MoveToNextHeader)', 'b:Markdown_MoveToNextHeader') +call MapNormVis('(Markdown_MoveToPreviousHeader)', 'b:Markdown_MoveToPreviousHeader') +call MapNormVis('(Markdown_MoveToNextSiblingHeader)', 'b:Markdown_MoveToNextSiblingHeader') +call MapNormVis('(Markdown_MoveToPreviousSiblingHeader)', 'b:Markdown_MoveToPreviousSiblingHeader') " Menmonic: Up -call MapNormVis(']u', 'b:Markdown_MoveToParentHeader') +call MapNormVis('(Markdown_MoveToParentHeader)', 'b:Markdown_MoveToParentHeader') " Menmonic: Current -call MapNormVis(']c', 'b:Markdown_MoveToCurHeader') +call MapNormVis('(Markdown_MoveToCurHeader)', 'b:Markdown_MoveToCurHeader') + +if ! exists('g:vim_markdown_no_default_key_mappings') +\ || !g:vim_markdown_no_default_key_mappings + nmap ]] (Markdown_MoveToNextHeader) + nmap [[ (Markdown_MoveToPreviousHeader) + nmap ][ (Markdown_MoveToNextSiblingHeader) + nmap [] (Markdown_MoveToPreviousSiblingHeader) + nmap ]u (Markdown_MoveToParentHeader) + nmap ]c (Markdown_MoveToCurHeader) + + vmap ]] (Markdown_MoveToNextHeader) + vmap [[ (Markdown_MoveToPreviousHeader) + vmap ][ (Markdown_MoveToNextSiblingHeader) + vmap [] (Markdown_MoveToPreviousSiblingHeader) + vmap ]u (Markdown_MoveToParentHeader) + vmap ]c (Markdown_MoveToCurHeader) +endif command! -buffer Toc call b:Markdown_Toc() command! -buffer Toch call b:Markdown_Toc('horizontal')