From 3ab189ec8bef4b0cbef2ea872c94bfb9bc85af00 Mon Sep 17 00:00:00 2001 From: Andrew Schaaf Date: Wed, 19 Jan 2011 13:04:39 -0500 Subject: [PATCH] Preserve ^[ ]+\|[ ]* on Return --- Commands/Return.tmCommand | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Commands/Return.tmCommand diff --git a/Commands/Return.tmCommand b/Commands/Return.tmCommand new file mode 100644 index 0000000..bdd115e --- /dev/null +++ b/Commands/Return.tmCommand @@ -0,0 +1,35 @@ + + + + + beforeRunningCommand + nop + command + #!/usr/bin/env ruby + +line = ENV['TM_CURRENT_LINE'] +col = ENV['TM_LINE_INDEX'].to_i + +m = /^([ ]+\|[ ]*)/.match line + +if m and col >= m[1].length + $stdout.write "\n#{m[1]}" +else + $stdout.write "\n" +end + + + input + selection + keyEquivalent + + name + Return + output + afterSelectedText + scope + source.jade + uuid + 45F19BDD-2A4D-4848-83D5-E5F1A7FF4726 + +