1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 15:19:12 +08:00

Add shortcut to use NERDCommenterAltDelims (#3417)

This commit is contained in:
Yanick Fratantonio 2020-03-24 02:29:34 +01:00 committed by GitHub
parent 1b9e252015
commit 13b28149d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -291,6 +291,7 @@ function! SpaceVim#layers#core#config() abort
nnoremap <silent> <Plug>CommentToLineInvert :call <SID>comment_to_line(1)<Cr>
nnoremap <silent> <Plug>CommentParagraphs :call <SID>comment_paragraphs(0)<Cr>
nnoremap <silent> <Plug>CommentParagraphsInvert :call <SID>comment_paragraphs(1)<Cr>
call SpaceVim#mapping#space#def('nmap', ['c', 'a'], '<Plug>NERDCommenterAltDelims', 'switch-to-alternative-delims', 0, 1)
call SpaceVim#mapping#space#def('nmap', ['c', 'l'], '<Plug>NERDCommenterInvert', 'toggle-comment-lines', 0, 1)
call SpaceVim#mapping#space#def('nmap', ['c', 'L'], '<Plug>NERDCommenterComment', 'comment-lines', 0, 1)
call SpaceVim#mapping#space#def('nmap', ['c', 'u'], '<Plug>NERDCommenterUncomment', 'uncomment-lines', 0, 1)

View File

@ -956,6 +956,7 @@ Comments are handled by [nerdcommenter](https://github.com/scrooloose/nerdcommen
| Key Bindings | Descriptions |
| ------------ | ------------------------------------------------------- |
| `SPC ;` | comment operator |
| `SPC c a` | switch to the alternative set of delimiters |
| `SPC c h` | hide/show comments |
| `SPC c l` | toggle comment lines |
| `SPC c L` | comment lines |