forked from jsallis/nu.tmbundle
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added command to surround with try/catch
- Loading branch information
Jason Sallis
committed
Oct 7, 2008
1 parent
08941e6
commit c2b52ca
Showing
2 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>beforeRunningCommand</key> | ||
<string>nop</string> | ||
<key>command</key> | ||
<string>#!/usr/bin/env ruby | ||
selected_text = ENV["TM_SELECTED_TEXT"] | ||
if not selected_text.nil? | ||
print "(try\n" | ||
print selected_text | ||
#STDIN.read.split('\n').each {|line| print "#{line}"} | ||
print "\n\t(catch ($1)\n" | ||
print "\t\t$0))" | ||
end</string> | ||
<key>fallbackInput</key> | ||
<string>none</string> | ||
<key>input</key> | ||
<string>none</string> | ||
<key>keyEquivalent</key> | ||
<string>^~@t</string> | ||
<key>name</key> | ||
<string>Surround with try/catch</string> | ||
<key>output</key> | ||
<string>insertAsSnippet</string> | ||
<key>scope</key> | ||
<string>source.nu</string> | ||
<key>uuid</key> | ||
<string>D1E8EEBD-939D-498B-8B68-966C734AA65B</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters