From 8853cbca8d956767e357540de792259f3922d15b Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Thu, 16 Apr 2015 11:09:58 +0200 Subject: [PATCH 1/1] Remove parenthesis from maps --- README.md | 12 ++++++------ ftplugin/mkd.vim | 42 ++++++++++++++++++++---------------------- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 8389667..5ba457d 100644 --- a/README.md +++ b/README.md @@ -113,17 +113,17 @@ The following work on normal and visual modes: Known limitation: does not work for links that span multiple lines. -- `]]`: go to next header. `(Markdown_MoveToNextHeader)` +- `]]`: go to next header. `Markdown_MoveToNextHeader` -- `[[`: go to previous header. Contrast with `]c`. `(Markdown_MoveToPreviousHeader)` +- `[[`: go to previous header. Contrast with `]c`. `Markdown_MoveToPreviousHeader` -- `][`: go to next sibling header if any. `(Markdown_MoveToNextSiblingHeader)` +- `][`: go to next sibling header if any. `Markdown_MoveToNextSiblingHeader` -- `[]`: go to previous sibling header if any. `(Markdown_MoveToPreviousSiblingHeader)` +- `[]`: go to previous sibling header if any. `Markdown_MoveToPreviousSiblingHeader` -- `]c`: go to Current header. `(Markdown_MoveToCurHeader)` +- `]c`: go to Current header. `Markdown_MoveToCurHeader` -- `]u`: go to parent header (Up). `(Markdown_MoveToParentHeader)` +- `]u`: go to parent header (Up). `Markdown_MoveToParentHeader` ## Commands diff --git a/ftplugin/mkd.vim b/ftplugin/mkd.vim index a2e7b5e..9d84c77 100644 --- a/ftplugin/mkd.vim +++ b/ftplugin/mkd.vim @@ -505,31 +505,29 @@ function! s:OpenUrlUnderCursor() endif endfunction -call MapNormVis('(Markdown_MoveToNextHeader)', 'Markdown_MoveToNextHeader') -call MapNormVis('(Markdown_MoveToPreviousHeader)', 'Markdown_MoveToPreviousHeader') -call MapNormVis('(Markdown_MoveToNextSiblingHeader)', 'Markdown_MoveToNextSiblingHeader') -call MapNormVis('(Markdown_MoveToPreviousSiblingHeader)', 'Markdown_MoveToPreviousSiblingHeader') -" Menmonic: Up -call MapNormVis('(Markdown_MoveToParentHeader)', 'Markdown_MoveToParentHeader') -" Menmonic: Current -call MapNormVis('(Markdown_MoveToCurHeader)', 'Markdown_MoveToCurHeader') +call MapNormVis('Markdown_MoveToNextHeader', 'Markdown_MoveToNextHeader') +call MapNormVis('Markdown_MoveToPreviousHeader', 'Markdown_MoveToPreviousHeader') +call MapNormVis('Markdown_MoveToNextSiblingHeader', 'Markdown_MoveToNextSiblingHeader') +call MapNormVis('Markdown_MoveToPreviousSiblingHeader', 'Markdown_MoveToPreviousSiblingHeader') +call MapNormVis('Markdown_MoveToParentHeader', 'Markdown_MoveToParentHeader') +call MapNormVis('Markdown_MoveToCurHeader', 'Markdown_MoveToCurHeader') nnoremap (OpenUrlUnderCursor) :call OpenUrlUnderCursor() if !get(g:, 'vim_markdown_no_default_key_mappings', 0) - nmap ]] (Markdown_MoveToNextHeader) - nmap [[ (Markdown_MoveToPreviousHeader) - nmap ][ (Markdown_MoveToNextSiblingHeader) - nmap [] (Markdown_MoveToPreviousSiblingHeader) - nmap ]u (Markdown_MoveToParentHeader) - nmap ]c (Markdown_MoveToCurHeader) - nmap gx (OpenUrlUnderCursor) - - vmap ]] (Markdown_MoveToNextHeader) - vmap [[ (Markdown_MoveToPreviousHeader) - vmap ][ (Markdown_MoveToNextSiblingHeader) - vmap [] (Markdown_MoveToPreviousSiblingHeader) - vmap ]u (Markdown_MoveToParentHeader) - vmap ]c (Markdown_MoveToCurHeader) + nmap ]] Markdown_MoveToNextHeader + nmap [[ Markdown_MoveToPreviousHeader + nmap ][ Markdown_MoveToNextSiblingHeader + nmap [] Markdown_MoveToPreviousSiblingHeader + nmap ]u Markdown_MoveToParentHeader + nmap ]c Markdown_MoveToCurHeader + nmap gx OpenUrlUnderCursor + + vmap ]] Markdown_MoveToNextHeader + vmap [[ Markdown_MoveToPreviousHeader + vmap ][ Markdown_MoveToNextSiblingHeader + vmap [] Markdown_MoveToPreviousSiblingHeader + vmap ]u Markdown_MoveToParentHeader + vmap ]c Markdown_MoveToCurHeader endif command! -buffer -range=% HeaderDecrease call s:HeaderDecrease(, ) -- 2.39.5