Merge pull request #244 from svermeulen/working

Add file format and function for identifying commented lines from outside plugin
This commit is contained in:
Caleb Maclennan 2016-05-24 17:04:55 +03:00
commit 0a186faad1
No known key found for this signature in database
GPG Key ID: 63CC496475267693

View File

@ -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
"