diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index c8b5349..fab722c 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -2751,7 +2751,7 @@ inoremap NERDCommenterInInsert :call NERDComment( " Create menu items for the specified modes. If a:combo is not empty, then " also define mappings and show a:combo in the menu items. -function! s:CreateMenuItems(modes, target, desc, combo) +function! s:CreateMaps(modes, target, desc, combo) let menuRoot = get(['', 'comment', '&comment', '&Plugin.&comment'], \ g:NERDMenuMode, '') let leader = escape(exists('mapleader') ? mapleader : '\', '\') @@ -2771,22 +2771,22 @@ function! s:CreateMenuItems(modes, target, desc, combo) endif endfor endfunction -call s:CreateMenuItems('nv', 'NERDCommenterComment', 'Comment', 'cc') -call s:CreateMenuItems('nv', 'NERDCommenterToggle', 'Toggle', 'c') -call s:CreateMenuItems('nv', 'NERDCommenterMinimal', 'Minimal', 'cm') -call s:CreateMenuItems('nv', 'NERDCommenterNest', 'Nested', 'cn') -call s:CreateMenuItems('n', 'NERDCommenterToEOL', 'To EOL', 'c$') -call s:CreateMenuItems('nv', 'NERDCommenterInvert', 'Invert', 'ci') -call s:CreateMenuItems('nv', 'NERDCommenterSexy', 'Sexy', 'cs') -call s:CreateMenuItems('nv', 'NERDCommenterYank', 'Yank then comment', 'cy') -call s:CreateMenuItems('n', 'NERDCommenterAppend', 'Append', 'cA') -call s:CreateMenuItems('', ':', '-Sep-', '') -call s:CreateMenuItems('nv', 'NERDCommenterAlignLeft', 'Left aligned', 'cl') -call s:CreateMenuItems('nv', 'NERDCommenterAlignBoth', 'Left and right aligned', 'cb') -call s:CreateMenuItems('', ':', '-Sep2-', '') -call s:CreateMenuItems('nv', 'NERDCommenterUncomment', 'Uncomment', 'cu') -call s:CreateMenuItems('n', 'NERDCommenterAltDelims', 'Switch Delimiters', 'ca') -call s:CreateMenuItems('i', 'NERDCommenterInInsert', 'Insert Comment Here', '') -call s:CreateMenuItems('', ':', '-Sep3-', '') -call s:CreateMenuItems('', ':help NERDCommenterContents', 'Help', '') +call s:CreateMaps('nv', 'NERDCommenterComment', 'Comment', 'cc') +call s:CreateMaps('nv', 'NERDCommenterToggle', 'Toggle', 'c') +call s:CreateMaps('nv', 'NERDCommenterMinimal', 'Minimal', 'cm') +call s:CreateMaps('nv', 'NERDCommenterNest', 'Nested', 'cn') +call s:CreateMaps('n', 'NERDCommenterToEOL', 'To EOL', 'c$') +call s:CreateMaps('nv', 'NERDCommenterInvert', 'Invert', 'ci') +call s:CreateMaps('nv', 'NERDCommenterSexy', 'Sexy', 'cs') +call s:CreateMaps('nv', 'NERDCommenterYank', 'Yank then comment', 'cy') +call s:CreateMaps('n', 'NERDCommenterAppend', 'Append', 'cA') +call s:CreateMaps('', ':', '-Sep-', '') +call s:CreateMaps('nv', 'NERDCommenterAlignLeft', 'Left aligned', 'cl') +call s:CreateMaps('nv', 'NERDCommenterAlignBoth', 'Left and right aligned', 'cb') +call s:CreateMaps('', ':', '-Sep2-', '') +call s:CreateMaps('nv', 'NERDCommenterUncomment', 'Uncomment', 'cu') +call s:CreateMaps('n', 'NERDCommenterAltDelims', 'Switch Delimiters', 'ca') +call s:CreateMaps('i', 'NERDCommenterInInsert', 'Insert Comment Here', '') +call s:CreateMaps('', ':', '-Sep3-', '') +call s:CreateMaps('', ':help NERDCommenterContents', 'Help', '') " vim: set foldmethod=marker :