From fbe3bd3c3533d4ed94511c4f41374472f2bd9602 Mon Sep 17 00:00:00 2001 From: svermeulen Date: Sat, 25 May 2013 15:31:00 -0300 Subject: [PATCH 1/2] Exposed function to check whether a line is commented --- plugin/NERD_commenter.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 13c7693..25521ad 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -1035,6 +1035,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 " From f1a23cde6d3c537836d03eabb4133987b60a046d Mon Sep 17 00:00:00 2001 From: svermeulen Date: Mon, 16 Jun 2014 16:11:42 -0300 Subject: [PATCH 2/2] Fix for teak --- plugin/NERD_commenter.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 25521ad..8af218c 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -119,6 +119,7 @@ let s:delimiterMap = { \ 'cuda': { 'left': '/*','right': '*/', 'leftAlt': '//' }, \ 'crontab': { 'left': '#' }, \ 'cs': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, + \ 'teak': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' }, \ 'csp': { 'left': '--' }, \ 'cterm': { 'left': '*' }, \ 'cucumber': { 'left': '#' },