mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-12 11:43:46 -05:00
Add shim functions to pass through to autoload namespace
This commit is contained in:
@@ -78,6 +78,7 @@ function! s:CreateMaps(modes, target, desc, combo)
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
call s:CreateMaps('nx', 'Comment', 'Comment', 'cc')
|
call s:CreateMaps('nx', 'Comment', 'Comment', 'cc')
|
||||||
call s:CreateMaps('nx', 'Toggle', 'Toggle', 'c<Space>')
|
call s:CreateMaps('nx', 'Toggle', 'Toggle', 'c<Space>')
|
||||||
call s:CreateMaps('nx', 'Minimal', 'Minimal', 'cm')
|
call s:CreateMaps('nx', 'Minimal', 'Minimal', 'cm')
|
||||||
@@ -97,6 +98,15 @@ call s:CreateMaps('i', 'Insert', 'Insert Comment Here', '')
|
|||||||
call s:CreateMaps('', ':', '-Sep3-', '')
|
call s:CreateMaps('', ':', '-Sep3-', '')
|
||||||
call s:CreateMaps('', ':help NERDCommenterContents<CR>', 'Help', '')
|
call s:CreateMaps('', ':help NERDCommenterContents<CR>', 'Help', '')
|
||||||
|
|
||||||
|
" Shim functions so old code gets passed through to the autoload functions
|
||||||
|
function! NERDComment(mode, type)
|
||||||
|
return nerdcommenter#Comment(a:mode, a:type)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! NERDCommentIsLineCommented(lineNo)
|
||||||
|
return nerdcommenter#IsLineCommented(a:lineNo)
|
||||||
|
endfunction
|
||||||
|
|
||||||
inoremap <silent> <Plug>NERDCommenterInsert <Space><BS><Esc>:call nerdcommenter#Comment('i', "insert")<CR>
|
inoremap <silent> <Plug>NERDCommenterInsert <Space><BS><Esc>:call nerdcommenter#Comment('i', "insert")<CR>
|
||||||
|
|
||||||
" switch to/from alternative delimiters (does not use wrapper function)
|
" switch to/from alternative delimiters (does not use wrapper function)
|
||||||
|
|||||||
Reference in New Issue
Block a user