14 Commits

Author SHA1 Message Date
Martin Grenfell
6a9764f39a changed the version to 2.1.12 2008-03-31 18:11:58 +13:00
Martin Grenfell
6304c65434 added support for SVNdiff, gitAnnotate and gitdiff 2008-03-31 18:11:06 +13:00
Martin Grenfell
6089d08ed3 handy rakefile to create release zip files and deploy locally 2008-03-31 17:56:29 +13:00
Martin Grenfell
c53ae79ca3 added a credit and changelog entry for the previous commit 2008-03-10 21:17:51 +13:00
Martin Grenfell
432fe6b156 applied a patch from Li Jin to add support for 6 more filetypes 2008-03-10 21:14:03 +13:00
Martin Grenfell
aafe01e4e9 added support for patran and dakota 2008-03-10 21:10:22 +13:00
marty
4f05d713b4 updated version and timestamp 2008-02-24 00:31:44 +13:00
marty
59735a2904 bugfix: fixed a bug with &selection and visual commenting 2008-02-24 00:31:27 +13:00
marty
f8c60c7bd8 updated the version and updated time 2008-02-22 22:51:50 +13:00
marty
2783e3639d update to the change log 2008-02-22 22:49:53 +13:00
marty
6337d56893 added support for Wikipedia, mplayerconf and mkd 2008-02-22 22:45:56 +13:00
marty
a24534c6f1 bugfix: fixed a bug that was showing up when commenting in visual mode with multipart delims of different lengths 2008-02-06 21:08:40 +13:00
marty
122490be95 bugfix: now we take into account the &selection option and adjust visual selections accordingly 2008-02-06 20:23:54 +13:00
marty
d1af8af555 refactored a variable name 2008-02-06 20:11:17 +13:00
3 changed files with 80 additions and 9 deletions

18
Rakefile Normal file
View File

@@ -0,0 +1,18 @@
desc "Copy the vim/doc files into ~/.vim"
task :deploy_local do
run "cp plugin/NERD_commenter.vim ~/.vim/plugin"
run "cp doc/NERD_commenter.txt ~/.vim/doc"
end
desc "Create a zip archive for release to vim.org"
task :zip do
abort "NERD_commenter.zip already exists, aborting" if File.exist?("NERD_commenter.zip")
run "zip NERD_commenter.zip plugin/NERD_commenter.vim doc/NERD_commenter.txt"
end
def run(cmd)
puts "Executing: #{cmd}"
system cmd
end

View File

@@ -860,6 +860,23 @@ to get illegal syntax when uncommenting them.
==============================================================================
8. Changelog *NERDComChangelog*
2.1.12
- added support for patran and dakota, thx to Jacobo Diaz for the email
- added support for gentoo-env-d, gentoo-init-d, gentoo-make-conf, grub,
modconf and sudoers filetypes, thx to Li Jin for the patch.
- added support for SVNdiff, gitAnnotate, gitdiff. Thx to nicothakis for
posting the issue
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
@@ -1149,6 +1166,8 @@ comments and the NERDSpaceDelims option.
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
support :D
@@ -1171,7 +1190,7 @@ Lizendir fstab
Michael Böhler autoit, autohotkey and docbk
Aaron Small cmake
Ramiro htmldjango and django
Stefano Zacchiroli debcontrol and debchangelog
Stefano Zacchiroli debcontrol, debchangelog, mkd
Alex Tarkovsky ebuild and eclass
Jorge Rodrigues gams
Rainer Müller Objective C
@@ -1190,11 +1209,17 @@ Greg Weber D, haml
Bruce Sherrod velocity
timberke cobol
Aaron Schaefer factor
Laurent ARNOUD asterisk
Laurent ARNOUD asterisk, mplayerconf
Kuchma Michael plsql
Brett Warneke spectre
Pipp lhaskell
Renald Buter scala
Vladimir Lomov asymptote
Marco mrxvtrc, aap
nicothakis SVNAnnotate, CVSAnnotate, SVKAnnotate
nicothakis SVNAnnotate, CVSAnnotate, SVKAnnotate,
SVNdiff, gitAnnotate, gitdiff
Chen Xing Wikipedia
Jacobo Diaz dakota, patran
Li Jin gentoo-env-d, gentoo-init-d,
gentoo-make-conf, grub, modconf, sudoers

View File

@@ -1,7 +1,7 @@
" vim global plugin that provides easy code commenting for various file types
" Last Change: 18 jan 2008
" Last Change: 31 March 2008
" Maintainer: Martin Grenfell <martin_grenfell at msn.com>
let s:NERD_commenter_version = 2.1.9
let s:NERD_commenter_version = 2.1.12
" 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
@@ -256,6 +256,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
call s:MapDelimitersWithAlternative('//','', '/*','*/')
elseif a:filetype == "dcl"
call s:MapDelimiters('$!', '')
elseif a:filetype == "dakota"
call s:MapDelimiters('#', '')
elseif a:filetype == "debchangelog"
call s:MapDelimiters('', '')
elseif a:filetype == "debcontrol"
@@ -342,16 +344,28 @@ function s:SetUpForNewFiletype(filetype, forceReset)
call s:MapDelimiters('GEEK_COMMENT:', '')
elseif a:filetype == "gentoo-conf-d"
call s:MapDelimiters('#', '')
elseif a:filetype == "gentoo-env-d"
call s:MapDelimiters('#', '')
elseif a:filetype == "gentoo-init-d"
call s:MapDelimiters('#', '')
elseif a:filetype == "gentoo-make-conf"
call s:MapDelimiters('#', '')
elseif a:filetype == 'gentoo-package-keywords'
call s:MapDelimiters('#', '')
elseif a:filetype == 'gentoo-package-mask'
call s:MapDelimiters('#', '')
elseif a:filetype == 'gentoo-package-use'
call s:MapDelimiters('#', '')
elseif a:filetype == 'gitAnnotate'
call s:MapDelimiters('', '')
elseif a:filetype == 'gitdiff'
call s:MapDelimiters('', '')
elseif a:filetype == "gnuplot"
call s:MapDelimiters('#','')
elseif a:filetype == "groovy"
call s:MapDelimitersWithAlternative('//','', '/*','*/')
elseif a:filetype == "grub"
call s:MapDelimiters('#', '')
elseif a:filetype == "gtkrc"
call s:MapDelimiters('#', '')
elseif a:filetype == "haskell"
@@ -474,8 +488,12 @@ function s:SetUpForNewFiletype(filetype, forceReset)
call s:MapDelimiters('%', '')
elseif a:filetype == "mib"
call s:MapDelimiters('--', '')
elseif a:filetype == "mkd"
call s:MapDelimiters('>', '')
elseif a:filetype == "mma"
call s:MapDelimiters('(*','*)')
elseif a:filetype == "modconf"
call s:MapDelimiters('#', '')
elseif a:filetype == "model"
call s:MapDelimiters('$','$')
elseif a:filetype =~ "moduala."
@@ -486,6 +504,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
call s:MapDelimiters('(*','*)')
elseif a:filetype == "monk"
call s:MapDelimiters(';', '')
elseif a:filetype == "mplayerconf"
call s:MapDelimiters('#', '')
elseif a:filetype == "mrxvtrc"
call s:MapDelimiters('#', '')
elseif a:filetype == "mush"
@@ -538,6 +558,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
call s:MapDelimitersWithAlternative('{','}', '(*', '*)')
elseif a:filetype == "passwd"
call s:MapDelimiters('','')
elseif a:filetype == "patran"
call s:MapDelimitersWithAlternative('$','','/*', '*/')
elseif a:filetype == "pcap"
call s:MapDelimiters('#', '')
elseif a:filetype == "pccts"
@@ -708,6 +730,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
call s:MapDelimiters('--', '')
elseif a:filetype == "strace"
call s:MapDelimiters('/*','*/')
elseif a:filetype == "sudoers"
call s:MapDelimiters('#', '')
elseif a:filetype == "SVKAnnotate"
call s:MapDelimiters('','')
elseif a:filetype == "svn"
@@ -716,6 +740,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
call s:MapDelimiters('','')
elseif a:filetype == "SVNcommitlog"
call s:MapDelimiters('','')
elseif a:filetype == "SVNdiff"
call s:MapDelimiters('','')
elseif a:filetype == "systemverilog"
call s:MapDelimitersWithAlternative('//','', '/*','*/')
elseif a:filetype == "tads"
@@ -790,6 +816,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
call s:MapDelimiters('##', '')
elseif a:filetype == "wget"
call s:MapDelimiters('#', '')
elseif a:filetype ==? "Wikipedia"
call s:MapDelimiters('<!--','-->')
elseif a:filetype == "winbatch"
call s:MapDelimiters(';', '')
elseif a:filetype == "wml"
@@ -1041,7 +1069,7 @@ function s:CommentBlock(top, bottom, lSide, rSide, forceNested )
if s:Multipart()
"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 lastRightDelim = s:LastIndexOfDelim(b:right, theLine)
@@ -1440,14 +1468,14 @@ endfunction
" 'nested', 'toEOL', 'prepend', 'append', 'insert', 'uncomment', 'yank'
function! NERDComment(isVisual, type) range
" we want case sensitivity when commenting
let prevIgnoreCase = &ignorecase
let oldIgnoreCase = &ignorecase
set noignorecase
if a:isVisual
let firstLine = line("'<")
let lastLine = line("'>")
let firstCol = col("'<")
let lastCol = col("'>")
let lastCol = col("'>") - (&selection == 'exclusive' ? 1 : 0)
else
let firstLine = a:firstline
let lastLine = a:lastline
@@ -1529,7 +1557,7 @@ function! NERDComment(isVisual, type) range
execute firstLine .','. lastLine .'call NERDComment('. a:isVisual .', "norm")'
endif
let &ignorecase = prevIgnoreCase
let &ignorecase = oldIgnoreCase
endfunction
" Function: s:PlaceDelimitersAndInsBetween() function {{{2