From 2e9b7ca58eba14950a9ef8a05b38c26fdc422d6e Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Sun, 20 Jul 2008 00:57:23 +1200 Subject: [PATCH] dont map the insert comment map if the key isnt set --- plugin/NERD_commenter.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 005dcd8..c42b8b5 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -3294,7 +3294,9 @@ execute 'nmap ' . g:NERDAppendComMap . ' :call NERDComment(0, "append")< execute 'nmap ' . g:NERDPrependComMap . ' :call NERDComment(0, "prepend")' " set up the mapping to insert comment delims at the cursor position in insert mode -execute 'inoremap ' . g:NERDComInInsertMap . ' ' . ':call NERDComment(0, "insert")' +if g:NERDComInInsertMap != '' + execute 'inoremap ' . g:NERDComInInsertMap . ' ' . ':call NERDComment(0, "insert")' +endif " Section: Menu item setup {{{1 " ===========================================================================