diff --git a/nvim/dotfiles/plugins-list.vim b/nvim/dotfiles/plugins-list.vim index d540517..c08d2bf 100644 --- a/nvim/dotfiles/plugins-list.vim +++ b/nvim/dotfiles/plugins-list.vim @@ -14,6 +14,7 @@ Plug 'tpope/vim-repeat' " if g:vim_ide Plug 'tomtom/tcomment_vim' + Plug 'glts/vim-textobj-comment' " else " Plug 'tpope/vim-commentary' " endif diff --git a/nvim/plugin/editing.vim b/nvim/plugin/editing.vim index d53d96a..59b18d3 100644 --- a/nvim/plugin/editing.vim +++ b/nvim/plugin/editing.vim @@ -236,6 +236,7 @@ set commentstring=//%s " Remove the mappings that I won't use let g:tcomment_maps = 0 + " Closely replicate the behavior of tpope/vim-commentary nmap gc TComment_gc nmap gcc TComment_gcc nmap gC TComment_gcb @@ -244,6 +245,8 @@ set commentstring=//%s nmap gCC m'o''TComment_gcb+ xnoremap gc :TCommentMaybeInline xnoremap gC :TCommentBlock + " Make an alias for the comment text object + omap gc ac " }}}