diff --git a/autoload/nerdcommenter.vim b/autoload/nerdcommenter.vim index 6c81827..721923d 100644 --- a/autoload/nerdcommenter.vim +++ b/autoload/nerdcommenter.vim @@ -1298,7 +1298,7 @@ function! nerdcommenter#Comment(mode, type) range abort endfunction -" Function: NERDCommentIsCharCommented(line, col) abort +" Function: nerdcommenter#IsCharCommented(line, col) abort " Check if the character at [line, col] is inside a comment " Note the Comment delimeter it self is considered as part of the comment " @@ -1306,7 +1306,7 @@ endfunction " -line the line number of the character " -col the column number of the character " Return: Number, 1 if the character is inside a comment, 0 if is not -function! NERDCommentIsCharCommented(line, col) abort +function! nerdcommenter#IsCharCommented(line, col) abort " Function: s:searchfor(str, line, col, direction, [maxline]) " search str in the buffer, including the character at [line, col] " Args: diff --git a/plugin/nerdcommenter.vim b/plugin/nerdcommenter.vim index c4c4497..13db9cc 100644 --- a/plugin/nerdcommenter.vim +++ b/plugin/nerdcommenter.vim @@ -107,6 +107,10 @@ function! NERDCommentIsLineCommented(lineNo) return nerdcommenter#IsLineCommented(a:lineNo) endfunction +function! NERDCommentIsCharCommented(line, col) + return nerdcommenter#IsCharCommented(a:line, a:col) +endfunction + inoremap NERDCommenterInsert :call nerdcommenter#Comment('i', "insert") " switch to/from alternative delimiters (does not use wrapper function)