From fe8934621207138820a7164dae8e63bd9959532a Mon Sep 17 00:00:00 2001 From: Yash Karandikar Date: Sun, 19 Jun 2022 16:07:39 +0530 Subject: [PATCH] Add & configure NERDCommenter --- .vimrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.vimrc b/.vimrc index 3320537..166e1c6 100644 --- a/.vimrc +++ b/.vimrc @@ -26,8 +26,10 @@ Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'tpope/vim-fugitive' Plug 'valloric/MatchTagAlways' +Plug 'preservim/nerdcommenter' call plug#end() + colorscheme nord " airline should detect the theme automatically but just in case @@ -64,3 +66,10 @@ let g:autoclose_vim_commentmode = 1 " smart search set ignorecase set smartcase + +" nerdcommenter settings +filetype plugin on +let g:NERDCreateDefaultMappings = 0 +let g:NERDSpaceDelims = 1 +nnoremap :call nerdcommenter#Comment('n', 'invert') +nnoremap :call nerdcommenter#Comment('n', 'append')