Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make Insert Block Comment work with discontinuous selections

This only works when none of the discontinuous selections contain newlines.
  • Loading branch information...
commit f1af1fec56d49a360ea79735eb5aa7890cf8dd04 1 parent e8b4aa3
@sorbits sorbits authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 Commands/Insert Block Comment.tmCommand
View
4 Commands/Insert Block Comment.tmCommand
@@ -21,6 +21,10 @@ end
start, stop = find_markers
input = STDIN.read.to_s
+if ENV['TM_SELECTION'] =~ /&/
+ TextMate.exit_replace_text(input.gsub(/.+/, "#{start}\\&#{stop}"))
+end
+
if input =~ /\n/
start << "\n"
stop << "\n"
Please sign in to comment.
Something went wrong with that request. Please try again.