Merge pull request #242 from dmitmel/master

[pull] master from dmitmel:master
This commit is contained in:
pull[bot] 2021-04-24 16:29:46 +00:00 committed by GitHub
commit dfb5750295
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -16,6 +16,7 @@
Plug 'tpope/vim-repeat' Plug 'tpope/vim-repeat'
" if g:vim_ide " if g:vim_ide
Plug 'tomtom/tcomment_vim' Plug 'tomtom/tcomment_vim'
Plug 'glts/vim-textobj-comment'
" else " else
" Plug 'tpope/vim-commentary' " Plug 'tpope/vim-commentary'
" endif " endif

View file

@ -236,6 +236,7 @@ set commentstring=//%s
" Remove the mappings that I won't use " Remove the mappings that I won't use
let g:tcomment_maps = 0 let g:tcomment_maps = 0
" Closely replicate the behavior of tpope/vim-commentary
nmap <silent> gc <Plug>TComment_gc nmap <silent> gc <Plug>TComment_gc
nmap <silent> gcc <Plug>TComment_gcc nmap <silent> gcc <Plug>TComment_gcc
nmap <silent> gC <Plug>TComment_gcb nmap <silent> gC <Plug>TComment_gcb
@ -244,6 +245,8 @@ set commentstring=//%s
nmap <silent> gCC m'o<Esc>''<Plug>TComment_gcb+ nmap <silent> gCC m'o<Esc>''<Plug>TComment_gcb+
xnoremap <silent> gc :TCommentMaybeInline<CR> xnoremap <silent> gc :TCommentMaybeInline<CR>
xnoremap <silent> gC :TCommentBlock<CR> xnoremap <silent> gC :TCommentBlock<CR>
" Make an alias for the comment text object
omap <silent> gc ac
" }}} " }}}