8 Commits
2.1.7 ... 2.1.8

2 changed files with 44 additions and 10 deletions

View File

@@ -744,7 +744,7 @@ If this option is set to 1 then the top style will be used.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDDefaultNesting* *NERDDefaultNesting*
Values: 0 or 1. Values: 0 or 1.
Default 0. Default 1.
When this option is set to 1, comments are nested automatically. That is, if When this option is set to 1, comments are nested automatically. That is, if
you hit ,cc on a line that is already commented it will be commented you hit ,cc on a line that is already commented it will be commented
@@ -860,6 +860,19 @@ to get illegal syntax when uncommenting them.
============================================================================== ==============================================================================
8. Changelog *NERDComChangelog* 8. Changelog *NERDComChangelog*
2.1.8
- fixed a couple of bugs with the NERDSpaceDelims option, thx to
David Miani and Jeremy Hinegardner
- added dummy support for lhaskell, thx to pipp for posting the issue
- added an alternative set of delims for the plsql filetype, thx to Kuchma
Michael
- added support for spectre, thx to Brett Warneke
- added support for scala, thx to Renald Buter
- added support for asymptote, thx to Vladimir Lomov
- made NERDDefaultNesting enabled by default as this seems more intuitive,
thx to marco for the suggestion
2.1.7 2.1.7
- added support for haml, thx to Greb Weber - added support for haml, thx to Greb Weber
- added support for asterisk, thx to Laurent ARNOUD - added support for asterisk, thx to Laurent ARNOUD
@@ -1123,6 +1136,14 @@ Cheers to Cheng Fang for the bug reports :D
Cheers to Yongwei Wu for a bug report about the passwd filetype. Cheers to Yongwei Wu for a bug report about the passwd filetype.
Thanks to David Miani for reporting a space-removal bug when using the
NERDSpaceDelims option.
Thanks to Jeremy Hinegardner for emailing me about a bug with aligned
comments and the NERDSpaceDelims option.
Thanks to marco for suggesting NERDDefaultNesting be set by default.
Not to forget! Thanks to the following people for sending me new filetypes to Not to forget! Thanks to the following people for sending me new filetypes to
support :D support :D
@@ -1165,3 +1186,8 @@ Bruce Sherrod velocity
timberke cobol timberke cobol
Aaron Schaefer factor Aaron Schaefer factor
Laurent ARNOUD asterisk Laurent ARNOUD asterisk
Kuchma Michael plsql
Brett Warneke spectre
Pipp lhaskell
Renald Buter scala
Vladimir Lomov asymptote

View File

@@ -1,7 +1,7 @@
" vim global plugin that provides easy code commenting for various file types " vim global plugin that provides easy code commenting for various file types
" Last Change: 26 oct 2007 " Last Change: 14 dec 2007
" Maintainer: Martin Grenfell <martin_grenfell at msn.com> " Maintainer: Martin Grenfell <martin_grenfell at msn.com>
let s:NERD_commenter_version = 2.1.7 let s:NERD_commenter_version = 2.1.8
" For help documentation type :help NERDCommenter. If this fails, Restart vim " For help documentation type :help NERDCommenter. If this fails, Restart vim
" and try again. If it sill doesnt work... the help page is at the bottom " and try again. If it sill doesnt work... the help page is at the bottom
@@ -54,7 +54,7 @@ call s:InitVariable("g:NERDAllowAnyVisualDelims", 1)
call s:InitVariable("g:NERDBlockComIgnoreEmpty", 0) call s:InitVariable("g:NERDBlockComIgnoreEmpty", 0)
call s:InitVariable("g:NERDCommentWholeLinesInVMode", 0) call s:InitVariable("g:NERDCommentWholeLinesInVMode", 0)
call s:InitVariable("g:NERDCompactSexyComs", 0) call s:InitVariable("g:NERDCompactSexyComs", 0)
call s:InitVariable("g:NERDDefaultNesting", 0) call s:InitVariable("g:NERDDefaultNesting", 1)
call s:InitVariable("g:NERDMenuMode", 3) call s:InitVariable("g:NERDMenuMode", 3)
call s:InitVariable("g:NERDLPlace", "[>") call s:InitVariable("g:NERDLPlace", "[>")
call s:InitVariable("g:NERDUsePlaceHolders", 1) call s:InitVariable("g:NERDUsePlaceHolders", 1)
@@ -166,6 +166,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
call s:MapDelimiters('''', '') call s:MapDelimiters('''', '')
elseif a:filetype == "asterisk" elseif a:filetype == "asterisk"
call s:MapDelimiters(';', '') call s:MapDelimiters(';', '')
elseif a:filetype == "asy"
call s:MapDelimiters('//', '')
elseif a:filetype == "atlas" elseif a:filetype == "atlas"
call s:MapDelimiters('C','$') call s:MapDelimiters('C','$')
elseif a:filetype == "autohotkey" elseif a:filetype == "autohotkey"
@@ -416,6 +418,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
call s:MapDelimiters('/*','*/') call s:MapDelimiters('/*','*/')
elseif a:filetype == "lftp" elseif a:filetype == "lftp"
call s:MapDelimiters('#', '') call s:MapDelimiters('#', '')
elseif a:filetype == "lhaskell"
call s:MapDelimiters('','')
elseif a:filetype == "lifelines" elseif a:filetype == "lifelines"
call s:MapDelimiters('/*','*/') call s:MapDelimiters('/*','*/')
elseif a:filetype == "lilo" elseif a:filetype == "lilo"
@@ -553,7 +557,7 @@ function s:SetUpForNewFiletype(filetype, forceReset)
elseif a:filetype == "plm" elseif a:filetype == "plm"
call s:MapDelimitersWithAlternative('//','', '/*','*/') call s:MapDelimitersWithAlternative('//','', '/*','*/')
elseif a:filetype == "plsql" elseif a:filetype == "plsql"
call s:MapDelimiters('--', '') call s:MapDelimitersWithAlternative('--', '', '/*', '*/')
elseif a:filetype == "po" elseif a:filetype == "po"
call s:MapDelimiters('#', '') call s:MapDelimiters('#', '')
elseif a:filetype == "postscr" elseif a:filetype == "postscr"
@@ -620,6 +624,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
call s:MapDelimitersWithAlternative('//','', '/*', '') call s:MapDelimitersWithAlternative('//','', '/*', '')
elseif a:filetype == "sather" elseif a:filetype == "sather"
call s:MapDelimiters('--', '') call s:MapDelimiters('--', '')
elseif a:filetype == "scala"
call s:MapDelimitersWithAlternative('//','', '/*','*/')
elseif a:filetype == "scheme" elseif a:filetype == "scheme"
call s:MapDelimiters(';', '') call s:MapDelimiters(';', '')
elseif a:filetype == "scilab" elseif a:filetype == "scilab"
@@ -676,6 +682,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
call s:MapDelimiters('#', '') call s:MapDelimiters('#', '')
elseif a:filetype == "specman" elseif a:filetype == "specman"
call s:MapDelimiters('//', '') call s:MapDelimiters('//', '')
elseif a:filetype == "spectre"
call s:MapDelimitersWithAlternative('//', '', '*', '')
elseif a:filetype == "spice" elseif a:filetype == "spice"
call s:MapDelimiters('$', '') call s:MapDelimiters('$', '')
elseif a:filetype == "sql" elseif a:filetype == "sql"
@@ -1102,12 +1110,12 @@ function s:CommentLines(forceNested, alignLeft, alignRight, firstLine, lastLine)
" check if we can comment this line " check if we can comment this line
if !isCommented || g:NERDUsePlaceHolders || s:Multipart() if !isCommented || g:NERDUsePlaceHolders || s:Multipart()
if a:alignLeft if a:alignLeft
let theLine = s:AddLeftDelimAligned(b:left, theLine, leftAlignIndx) let theLine = s:AddLeftDelimAligned(s:GetLeft(0,1,0), theLine, leftAlignIndx)
else else
let theLine = s:AddLeftDelim(s:GetLeft(0,1,0), theLine) let theLine = s:AddLeftDelim(s:GetLeft(0,1,0), theLine)
endif endif
if a:alignRight if a:alignRight
let theLine = s:AddRightDelimAligned(b:right, theLine, rightAlignIndx) let theLine = s:AddRightDelimAligned(s:GetRight(0,1,0), theLine, rightAlignIndx)
else else
let theLine = s:AddRightDelim(s:GetRight(0,1,0), theLine) let theLine = s:AddRightDelim(s:GetRight(0,1,0), theLine)
endif endif
@@ -1834,15 +1842,15 @@ function s:UncommentLineNormal(line)
let line = a:line let line = a:line
"get the comment status on the line so we know how it is commented "get the comment status on the line so we know how it is commented
let lineCommentStatus = s:IsCommentedOuttermost(b:leftAlt, b:rightAlt, b:left, b:right, line) let lineCommentStatus = s:IsCommentedOuttermost(b:left, b:right, b:leftAlt, b:rightAlt, line)
"it is commented with b:left and b:right so remove these delims "it is commented with b:left and b:right so remove these delims
if lineCommentStatus == 1 if lineCommentStatus == 1
let line = s:RemoveDelimiters(b:leftAlt, b:rightAlt, line) let line = s:RemoveDelimiters(b:left, b:right, line)
"it is commented with b:leftAlt and b:rightAlt so remove these delims "it is commented with b:leftAlt and b:rightAlt so remove these delims
elseif lineCommentStatus == 2 && g:NERDRemoveAltComs elseif lineCommentStatus == 2 && g:NERDRemoveAltComs
let line = s:RemoveDelimiters(b:left, b:right, line) let line = s:RemoveDelimiters(b:leftAlt, b:rightAlt, line)
"it is not properly commented with any delims so we check if it has "it is not properly commented with any delims so we check if it has
"any random left or right delims on it and remove the outtermost ones "any random left or right delims on it and remove the outtermost ones