From 12dd80c664da37eecb1161bad0911af814c5f2d3 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Tue, 11 Jul 2017 05:00:45 +0800 Subject: [PATCH] Add SPC c L for invert comment lines --- autoload/SpaceVim/mapping/space.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autoload/SpaceVim/mapping/space.vim b/autoload/SpaceVim/mapping/space.vim index 16e61bc9d..26e44d008 100644 --- a/autoload/SpaceVim/mapping/space.vim +++ b/autoload/SpaceVim/mapping/space.vim @@ -75,6 +75,13 @@ function! SpaceVim#mapping#space#init() abort " Toggles the comment state of the selected line(s). If the topmost selected " line is commented, all selected lines are uncommented and vice versa. call SpaceVim#mapping#space#def('nnoremap', ['c', 'l'], 'call feedkeys("\NERDCommenterComment")', 'Toggle comment line(s)', 1, 1) + call SpaceVim#mapping#space#def('nnoremap', ['c', 'L'], 'call feedkeys("\NERDCommenterInvert")', 'Toggle comment line(s)', 1, 1) + " in nerdcomment if has map to ... the default mapping will be + " disable, so we add it for compatibility + nnoremap cc :call feedkeys("\NERDCommenterComment") + xnoremap cc :call feedkeys("\NERDCommenterComment") + nnoremap ci :call feedkeys("\NERDCommenterInvert") + xnoremap ci :call feedkeys("\NERDCommenterInvert") let g:_spacevim_mappings_space.e = {'name' : '+Errors/Encoding'} let g:_spacevim_mappings_space.B = {'name' : '+Global-buffers'}