mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-01-23 10:21:59 +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': '//' },
|
\ 'cuda': { 'left': '/*','right': '*/', 'leftAlt': '//' },
|
||||||
\ 'crontab': { 'left': '#' },
|
\ 'crontab': { 'left': '#' },
|
||||||
\ 'cs': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
\ 'cs': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||||
|
\ 'teak': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||||
\ 'csp': { 'left': '--' },
|
\ 'csp': { 'left': '--' },
|
||||||
\ 'cterm': { 'left': '*' },
|
\ 'cterm': { 'left': '*' },
|
||||||
\ 'cucumber': { 'left': '#' },
|
\ 'cucumber': { 'left': '#' },
|
||||||
|
@ -1125,6 +1126,11 @@ function s:InvertComment(firstLine, lastLine)
|
||||||
endwhile
|
endwhile
|
||||||
endfunction
|
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
|
" Function: NERDComment(mode, type) function {{{2
|
||||||
" This function is a Wrapper for the main commenting functions
|
" This function is a Wrapper for the main commenting functions
|
||||||
"
|
"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user