mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-08 18:03:46 -05:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f05d713b4 | ||
|
|
59735a2904 | ||
|
|
f8c60c7bd8 | ||
|
|
2783e3639d | ||
|
|
6337d56893 | ||
|
|
a24534c6f1 | ||
|
|
122490be95 | ||
|
|
d1af8af555 | ||
|
|
08d14e7342 | ||
|
|
532c58db62 | ||
|
|
fb93d5869d |
@@ -860,6 +860,21 @@ to get illegal syntax when uncommenting them.
|
|||||||
==============================================================================
|
==============================================================================
|
||||||
8. Changelog *NERDComChangelog*
|
8. Changelog *NERDComChangelog*
|
||||||
|
|
||||||
|
2.1.11
|
||||||
|
- fixed a bug with the selection option and visual commenting (again).
|
||||||
|
Thanks to Ingo Karkat (again).
|
||||||
|
|
||||||
|
2.1.10
|
||||||
|
- added support for Wikipedia (thanks to Chen Xing)
|
||||||
|
- added support for mplayerconf
|
||||||
|
- bugfixes (thanks to Ingo Karkat for the bug report/patch)
|
||||||
|
- added support for mkd (thanks to Stefano Zacchiroli)
|
||||||
|
|
||||||
|
2.1.9
|
||||||
|
- added support for mrxvtrc and aap, thx to Marco for the emails
|
||||||
|
- added dummy support for SVNAnnotate, SVKAnnotate and CVSAnnotate, thx to
|
||||||
|
nicothakis for posting the issue
|
||||||
|
|
||||||
2.1.8
|
2.1.8
|
||||||
- fixed a couple of bugs with the NERDSpaceDelims option, thx to
|
- fixed a couple of bugs with the NERDSpaceDelims option, thx to
|
||||||
David Miani and Jeremy Hinegardner
|
David Miani and Jeremy Hinegardner
|
||||||
@@ -1144,6 +1159,8 @@ comments and the NERDSpaceDelims option.
|
|||||||
|
|
||||||
Thanks to marco for suggesting NERDDefaultNesting be set by default.
|
Thanks to marco for suggesting NERDDefaultNesting be set by default.
|
||||||
|
|
||||||
|
Thanks to Ingo Karkat for the bug reports and the bugfix patch.
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
@@ -1166,7 +1183,7 @@ Lizendir fstab
|
|||||||
Michael Böhler autoit, autohotkey and docbk
|
Michael Böhler autoit, autohotkey and docbk
|
||||||
Aaron Small cmake
|
Aaron Small cmake
|
||||||
Ramiro htmldjango and django
|
Ramiro htmldjango and django
|
||||||
Stefano Zacchiroli debcontrol and debchangelog
|
Stefano Zacchiroli debcontrol, debchangelog, mkd
|
||||||
Alex Tarkovsky ebuild and eclass
|
Alex Tarkovsky ebuild and eclass
|
||||||
Jorge Rodrigues gams
|
Jorge Rodrigues gams
|
||||||
Rainer Müller Objective C
|
Rainer Müller Objective C
|
||||||
@@ -1185,9 +1202,12 @@ Greg Weber D, haml
|
|||||||
Bruce Sherrod velocity
|
Bruce Sherrod velocity
|
||||||
timberke cobol
|
timberke cobol
|
||||||
Aaron Schaefer factor
|
Aaron Schaefer factor
|
||||||
Laurent ARNOUD asterisk
|
Laurent ARNOUD asterisk, mplayerconf
|
||||||
Kuchma Michael plsql
|
Kuchma Michael plsql
|
||||||
Brett Warneke spectre
|
Brett Warneke spectre
|
||||||
Pipp lhaskell
|
Pipp lhaskell
|
||||||
Renald Buter scala
|
Renald Buter scala
|
||||||
Vladimir Lomov asymptote
|
Vladimir Lomov asymptote
|
||||||
|
Marco mrxvtrc, aap
|
||||||
|
nicothakis SVNAnnotate, CVSAnnotate, SVKAnnotate
|
||||||
|
Chen Xing Wikipedia
|
||||||
|
|||||||
@@ -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: 14 dec 2007
|
" Last Change: 24 Feb 2008
|
||||||
" Maintainer: Martin Grenfell <martin_grenfell at msn.com>
|
" Maintainer: Martin Grenfell <martin_grenfell at msn.com>
|
||||||
let s:NERD_commenter_version = 2.1.8
|
let s:NERD_commenter_version = 2.1.11
|
||||||
|
|
||||||
" 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
|
||||||
@@ -132,6 +132,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
|||||||
"hardcoded the comment delimiters to use
|
"hardcoded the comment delimiters to use
|
||||||
if a:filetype == ""
|
if a:filetype == ""
|
||||||
call s:MapDelimiters('', '')
|
call s:MapDelimiters('', '')
|
||||||
|
elseif a:filetype == "aap"
|
||||||
|
call s:MapDelimiters('#', '')
|
||||||
elseif a:filetype == "abaqus"
|
elseif a:filetype == "abaqus"
|
||||||
call s:MapDelimiters('**', '')
|
call s:MapDelimiters('**', '')
|
||||||
elseif a:filetype == "abc"
|
elseif a:filetype == "abc"
|
||||||
@@ -248,6 +250,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
|||||||
call s:MapDelimiters('','')
|
call s:MapDelimiters('','')
|
||||||
elseif a:filetype == "cvs"
|
elseif a:filetype == "cvs"
|
||||||
call s:MapDelimiters('CVS:','')
|
call s:MapDelimiters('CVS:','')
|
||||||
|
elseif a:filetype == "CVSAnnotate"
|
||||||
|
call s:MapDelimiters('','')
|
||||||
elseif a:filetype == "d"
|
elseif a:filetype == "d"
|
||||||
call s:MapDelimitersWithAlternative('//','', '/*','*/')
|
call s:MapDelimitersWithAlternative('//','', '/*','*/')
|
||||||
elseif a:filetype == "dcl"
|
elseif a:filetype == "dcl"
|
||||||
@@ -470,6 +474,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
|||||||
call s:MapDelimiters('%', '')
|
call s:MapDelimiters('%', '')
|
||||||
elseif a:filetype == "mib"
|
elseif a:filetype == "mib"
|
||||||
call s:MapDelimiters('--', '')
|
call s:MapDelimiters('--', '')
|
||||||
|
elseif a:filetype == "mkd"
|
||||||
|
call s:MapDelimiters('>', '')
|
||||||
elseif a:filetype == "mma"
|
elseif a:filetype == "mma"
|
||||||
call s:MapDelimiters('(*','*)')
|
call s:MapDelimiters('(*','*)')
|
||||||
elseif a:filetype == "model"
|
elseif a:filetype == "model"
|
||||||
@@ -482,6 +488,10 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
|||||||
call s:MapDelimiters('(*','*)')
|
call s:MapDelimiters('(*','*)')
|
||||||
elseif a:filetype == "monk"
|
elseif a:filetype == "monk"
|
||||||
call s:MapDelimiters(';', '')
|
call s:MapDelimiters(';', '')
|
||||||
|
elseif a:filetype == "mplayerconf"
|
||||||
|
call s:MapDelimiters('#', '')
|
||||||
|
elseif a:filetype == "mrxvtrc"
|
||||||
|
call s:MapDelimiters('#', '')
|
||||||
elseif a:filetype == "mush"
|
elseif a:filetype == "mush"
|
||||||
call s:MapDelimiters('#', '')
|
call s:MapDelimiters('#', '')
|
||||||
elseif a:filetype == "muttrc"
|
elseif a:filetype == "muttrc"
|
||||||
@@ -702,8 +712,12 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
|||||||
call s:MapDelimiters('--', '')
|
call s:MapDelimiters('--', '')
|
||||||
elseif a:filetype == "strace"
|
elseif a:filetype == "strace"
|
||||||
call s:MapDelimiters('/*','*/')
|
call s:MapDelimiters('/*','*/')
|
||||||
|
elseif a:filetype == "SVKAnnotate"
|
||||||
|
call s:MapDelimiters('','')
|
||||||
elseif a:filetype == "svn"
|
elseif a:filetype == "svn"
|
||||||
call s:MapDelimiters('','')
|
call s:MapDelimiters('','')
|
||||||
|
elseif a:filetype == "SVNAnnotate"
|
||||||
|
call s:MapDelimiters('','')
|
||||||
elseif a:filetype == "SVNcommitlog"
|
elseif a:filetype == "SVNcommitlog"
|
||||||
call s:MapDelimiters('','')
|
call s:MapDelimiters('','')
|
||||||
elseif a:filetype == "systemverilog"
|
elseif a:filetype == "systemverilog"
|
||||||
@@ -780,6 +794,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
|||||||
call s:MapDelimiters('##', '')
|
call s:MapDelimiters('##', '')
|
||||||
elseif a:filetype == "wget"
|
elseif a:filetype == "wget"
|
||||||
call s:MapDelimiters('#', '')
|
call s:MapDelimiters('#', '')
|
||||||
|
elseif a:filetype ==? "Wikipedia"
|
||||||
|
call s:MapDelimiters('<!--','-->')
|
||||||
elseif a:filetype == "winbatch"
|
elseif a:filetype == "winbatch"
|
||||||
call s:MapDelimiters(';', '')
|
call s:MapDelimiters(';', '')
|
||||||
elseif a:filetype == "wml"
|
elseif a:filetype == "wml"
|
||||||
@@ -1031,7 +1047,7 @@ function s:CommentBlock(top, bottom, lSide, rSide, forceNested )
|
|||||||
|
|
||||||
if s:Multipart()
|
if s:Multipart()
|
||||||
"stick the right delimiter down
|
"stick the right delimiter down
|
||||||
let theLine = strpart(theLine, 0, rSide+strlen(leftSpaced)) . rightSpaced . strpart(theLine, rSide+strlen(rightSpaced))
|
let theLine = strpart(theLine, 0, rSide+strlen(leftSpaced)) . rightSpaced . strpart(theLine, rSide+strlen(leftSpaced))
|
||||||
|
|
||||||
let firstLeftDelim = s:FindDelimiterIndex(b:left, theLine)
|
let firstLeftDelim = s:FindDelimiterIndex(b:left, theLine)
|
||||||
let lastRightDelim = s:LastIndexOfDelim(b:right, theLine)
|
let lastRightDelim = s:LastIndexOfDelim(b:right, theLine)
|
||||||
@@ -1430,14 +1446,14 @@ endfunction
|
|||||||
" 'nested', 'toEOL', 'prepend', 'append', 'insert', 'uncomment', 'yank'
|
" 'nested', 'toEOL', 'prepend', 'append', 'insert', 'uncomment', 'yank'
|
||||||
function! NERDComment(isVisual, type) range
|
function! NERDComment(isVisual, type) range
|
||||||
" we want case sensitivity when commenting
|
" we want case sensitivity when commenting
|
||||||
let prevIgnoreCase = &ignorecase
|
let oldIgnoreCase = &ignorecase
|
||||||
set noignorecase
|
set noignorecase
|
||||||
|
|
||||||
if a:isVisual
|
if a:isVisual
|
||||||
let firstLine = line("'<")
|
let firstLine = line("'<")
|
||||||
let lastLine = line("'>")
|
let lastLine = line("'>")
|
||||||
let firstCol = col("'<")
|
let firstCol = col("'<")
|
||||||
let lastCol = col("'>")
|
let lastCol = col("'>") - (&selection == 'exclusive' ? 1 : 0)
|
||||||
else
|
else
|
||||||
let firstLine = a:firstline
|
let firstLine = a:firstline
|
||||||
let lastLine = a:lastline
|
let lastLine = a:lastline
|
||||||
@@ -1519,7 +1535,7 @@ function! NERDComment(isVisual, type) range
|
|||||||
execute firstLine .','. lastLine .'call NERDComment('. a:isVisual .', "norm")'
|
execute firstLine .','. lastLine .'call NERDComment('. a:isVisual .', "norm")'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let &ignorecase = prevIgnoreCase
|
let &ignorecase = oldIgnoreCase
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Function: s:PlaceDelimitersAndInsBetween() function {{{2
|
" Function: s:PlaceDelimitersAndInsBetween() function {{{2
|
||||||
|
|||||||
Reference in New Issue
Block a user