mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-01-23 07:12:22 +08:00
Merge pull request #244 from svermeulen/working
Add file format and function for identifying commented lines from outside plugin
This commit is contained in:
commit
0a186faad1
|
@ -124,6 +124,7 @@ let s:delimiterMap = {
|
|||
\ 'cuda': { 'left': '/*','right': '*/', 'leftAlt': '//' },
|
||||
\ 'crontab': { 'left': '#' },
|
||||
\ 'cs': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||
\ 'teak': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||
\ 'csp': { 'left': '--' },
|
||||
\ 'cterm': { 'left': '*' },
|
||||
\ 'cucumber': { 'left': '#' },
|
||||
|
@ -1125,6 +1126,11 @@ function s:InvertComment(firstLine, lastLine)
|
|||
endwhile
|
||||
endfunction
|
||||
|
||||
function! NERDCommentIsLineCommented(lineNo)
|
||||
let theLine = getline(a:lineNo)
|
||||
return s:IsInSexyComment(a:lineNo) || s:IsCommentedFromStartOfLine(s:Left(), theLine) || s:IsCommentedFromStartOfLine(s:Left({'alt': 1}), theLine)
|
||||
endfunction
|
||||
|
||||
" Function: NERDComment(mode, type) function {{{2
|
||||
" This function is a Wrapper for the main commenting functions
|
||||
"
|
||||
|
|
Loading…
Reference in New Issue
Block a user