mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim] use tcomment.vim instead of vim-commentary
This commit is contained in:
parent
0221e6c08c
commit
4d42627b83
2 changed files with 17 additions and 1 deletions
|
@ -12,7 +12,11 @@
|
|||
endif
|
||||
Plug 'Raimondi/delimitMate'
|
||||
Plug 'tpope/vim-repeat'
|
||||
Plug 'tpope/vim-commentary'
|
||||
" if g:vim_ide
|
||||
Plug 'tomtom/tcomment_vim'
|
||||
" else
|
||||
" Plug 'tpope/vim-commentary'
|
||||
" endif
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'Yggdroot/indentLine'
|
||||
Plug 'idbrii/detectindent'
|
||||
|
|
|
@ -233,6 +233,18 @@ set commentstring=//%s
|
|||
noremap <leader>s s
|
||||
noremap <leader>S S
|
||||
|
||||
" Remove the mappings that I won't use
|
||||
let g:tcomment_maps = 0
|
||||
|
||||
nmap <silent> gc <Plug>TComment_gc
|
||||
nmap <silent> gcc <Plug>TComment_gcc
|
||||
nmap <silent> gC <Plug>TComment_gcb
|
||||
" The default block commenting mapping refuses to work on a single line, as
|
||||
" a workaround I give it another empty one to work with.
|
||||
nmap <silent> gCC m'o<Esc>''<Plug>TComment_gcb+
|
||||
xnoremap <silent> gc :TCommentMaybeInline<CR>
|
||||
xnoremap <silent> gC :TCommentBlock<CR>
|
||||
|
||||
" }}}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue