mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-08 18:03:46 -05:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a9764f39a | ||
|
|
6304c65434 | ||
|
|
6089d08ed3 | ||
|
|
c53ae79ca3 | ||
|
|
432fe6b156 | ||
|
|
aafe01e4e9 | ||
|
|
4f05d713b4 | ||
|
|
59735a2904 |
18
Rakefile
Normal file
18
Rakefile
Normal 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
|
||||||
|
|
||||||
@@ -860,6 +860,17 @@ to get illegal syntax when uncommenting them.
|
|||||||
==============================================================================
|
==============================================================================
|
||||||
8. Changelog *NERDComChangelog*
|
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
|
2.1.10
|
||||||
- added support for Wikipedia (thanks to Chen Xing)
|
- added support for Wikipedia (thanks to Chen Xing)
|
||||||
- added support for mplayerconf
|
- added support for mplayerconf
|
||||||
@@ -1205,5 +1216,10 @@ Pipp lhaskell
|
|||||||
Renald Buter scala
|
Renald Buter scala
|
||||||
Vladimir Lomov asymptote
|
Vladimir Lomov asymptote
|
||||||
Marco mrxvtrc, aap
|
Marco mrxvtrc, aap
|
||||||
nicothakis SVNAnnotate, CVSAnnotate, SVKAnnotate
|
nicothakis SVNAnnotate, CVSAnnotate, SVKAnnotate,
|
||||||
|
SVNdiff, gitAnnotate, gitdiff
|
||||||
Chen Xing Wikipedia
|
Chen Xing Wikipedia
|
||||||
|
Jacobo Diaz dakota, patran
|
||||||
|
Li Jin gentoo-env-d, gentoo-init-d,
|
||||||
|
gentoo-make-conf, grub, modconf, sudoers
|
||||||
|
|
||||||
|
|||||||
@@ -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: 22 Feb 2008
|
" Last Change: 31 March 2008
|
||||||
" Maintainer: Martin Grenfell <martin_grenfell at msn.com>
|
" Maintainer: Martin Grenfell <martin_grenfell at msn.com>
|
||||||
let s:NERD_commenter_version = 2.1.10
|
let s:NERD_commenter_version = 2.1.12
|
||||||
|
|
||||||
" 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
|
||||||
@@ -256,6 +256,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
|||||||
call s:MapDelimitersWithAlternative('//','', '/*','*/')
|
call s:MapDelimitersWithAlternative('//','', '/*','*/')
|
||||||
elseif a:filetype == "dcl"
|
elseif a:filetype == "dcl"
|
||||||
call s:MapDelimiters('$!', '')
|
call s:MapDelimiters('$!', '')
|
||||||
|
elseif a:filetype == "dakota"
|
||||||
|
call s:MapDelimiters('#', '')
|
||||||
elseif a:filetype == "debchangelog"
|
elseif a:filetype == "debchangelog"
|
||||||
call s:MapDelimiters('', '')
|
call s:MapDelimiters('', '')
|
||||||
elseif a:filetype == "debcontrol"
|
elseif a:filetype == "debcontrol"
|
||||||
@@ -342,16 +344,28 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
|||||||
call s:MapDelimiters('GEEK_COMMENT:', '')
|
call s:MapDelimiters('GEEK_COMMENT:', '')
|
||||||
elseif a:filetype == "gentoo-conf-d"
|
elseif a:filetype == "gentoo-conf-d"
|
||||||
call s:MapDelimiters('#', '')
|
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'
|
elseif a:filetype == 'gentoo-package-keywords'
|
||||||
call s:MapDelimiters('#', '')
|
call s:MapDelimiters('#', '')
|
||||||
elseif a:filetype == 'gentoo-package-mask'
|
elseif a:filetype == 'gentoo-package-mask'
|
||||||
call s:MapDelimiters('#', '')
|
call s:MapDelimiters('#', '')
|
||||||
elseif a:filetype == 'gentoo-package-use'
|
elseif a:filetype == 'gentoo-package-use'
|
||||||
call s:MapDelimiters('#', '')
|
call s:MapDelimiters('#', '')
|
||||||
|
elseif a:filetype == 'gitAnnotate'
|
||||||
|
call s:MapDelimiters('', '')
|
||||||
|
elseif a:filetype == 'gitdiff'
|
||||||
|
call s:MapDelimiters('', '')
|
||||||
elseif a:filetype == "gnuplot"
|
elseif a:filetype == "gnuplot"
|
||||||
call s:MapDelimiters('#','')
|
call s:MapDelimiters('#','')
|
||||||
elseif a:filetype == "groovy"
|
elseif a:filetype == "groovy"
|
||||||
call s:MapDelimitersWithAlternative('//','', '/*','*/')
|
call s:MapDelimitersWithAlternative('//','', '/*','*/')
|
||||||
|
elseif a:filetype == "grub"
|
||||||
|
call s:MapDelimiters('#', '')
|
||||||
elseif a:filetype == "gtkrc"
|
elseif a:filetype == "gtkrc"
|
||||||
call s:MapDelimiters('#', '')
|
call s:MapDelimiters('#', '')
|
||||||
elseif a:filetype == "haskell"
|
elseif a:filetype == "haskell"
|
||||||
@@ -478,6 +492,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
|||||||
call s:MapDelimiters('>', '')
|
call s:MapDelimiters('>', '')
|
||||||
elseif a:filetype == "mma"
|
elseif a:filetype == "mma"
|
||||||
call s:MapDelimiters('(*','*)')
|
call s:MapDelimiters('(*','*)')
|
||||||
|
elseif a:filetype == "modconf"
|
||||||
|
call s:MapDelimiters('#', '')
|
||||||
elseif a:filetype == "model"
|
elseif a:filetype == "model"
|
||||||
call s:MapDelimiters('$','$')
|
call s:MapDelimiters('$','$')
|
||||||
elseif a:filetype =~ "moduala."
|
elseif a:filetype =~ "moduala."
|
||||||
@@ -542,6 +558,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
|||||||
call s:MapDelimitersWithAlternative('{','}', '(*', '*)')
|
call s:MapDelimitersWithAlternative('{','}', '(*', '*)')
|
||||||
elseif a:filetype == "passwd"
|
elseif a:filetype == "passwd"
|
||||||
call s:MapDelimiters('','')
|
call s:MapDelimiters('','')
|
||||||
|
elseif a:filetype == "patran"
|
||||||
|
call s:MapDelimitersWithAlternative('$','','/*', '*/')
|
||||||
elseif a:filetype == "pcap"
|
elseif a:filetype == "pcap"
|
||||||
call s:MapDelimiters('#', '')
|
call s:MapDelimiters('#', '')
|
||||||
elseif a:filetype == "pccts"
|
elseif a:filetype == "pccts"
|
||||||
@@ -712,6 +730,8 @@ 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 == "sudoers"
|
||||||
|
call s:MapDelimiters('#', '')
|
||||||
elseif a:filetype == "SVKAnnotate"
|
elseif a:filetype == "SVKAnnotate"
|
||||||
call s:MapDelimiters('','')
|
call s:MapDelimiters('','')
|
||||||
elseif a:filetype == "svn"
|
elseif a:filetype == "svn"
|
||||||
@@ -720,6 +740,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
|||||||
call s:MapDelimiters('','')
|
call s:MapDelimiters('','')
|
||||||
elseif a:filetype == "SVNcommitlog"
|
elseif a:filetype == "SVNcommitlog"
|
||||||
call s:MapDelimiters('','')
|
call s:MapDelimiters('','')
|
||||||
|
elseif a:filetype == "SVNdiff"
|
||||||
|
call s:MapDelimiters('','')
|
||||||
elseif a:filetype == "systemverilog"
|
elseif a:filetype == "systemverilog"
|
||||||
call s:MapDelimitersWithAlternative('//','', '/*','*/')
|
call s:MapDelimitersWithAlternative('//','', '/*','*/')
|
||||||
elseif a:filetype == "tads"
|
elseif a:filetype == "tads"
|
||||||
@@ -1453,7 +1475,7 @@ function! NERDComment(isVisual, type) range
|
|||||||
let firstLine = line("'<")
|
let firstLine = line("'<")
|
||||||
let lastLine = line("'>")
|
let lastLine = line("'>")
|
||||||
let firstCol = col("'<")
|
let firstCol = col("'<")
|
||||||
let lastCol = col("'>") - (&selection == 'exclusive' && has("gui_running") ? 1 : 0)
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user