Skip to content

Commit

Permalink
Issue jashkenas#8. Command-single-quote generates a single-quoted her…
Browse files Browse the repository at this point in the history
…edoc section.
  • Loading branch information
jashkenas committed Dec 5, 2010
1 parent 72a6042 commit c507324
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Commands/Insert Heredoc ''' quotes.tmCommand
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
column_number = ENV['TM_COLUMN_NUMBER']
whitespace = " " * (column_number.to_i - 1)
print &lt;&lt;-EOS
'''
#{whitespace}$0
#{whitespace}'''
EOS
</string>
<key>fallbackInput</key>
<string>line</string>
<key>input</key>
<string>none</string>
<key>keyEquivalent</key>
<string>@'</string>
<key>name</key>
<string>Insert Heredoc ''' quotes</string>
<key>output</key>
<string>insertAsSnippet</string>
<key>scope</key>
<string>source.coffee</string>
<key>uuid</key>
<string>C4F99E3D-1540-4BC1-8038-0A19D65BABC8</string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<string>D749F761-1740-4918-9490-90DF376BA72E</string>
<string>90424631-D00B-448C-B157-DAC92DFB2858</string>
<string>F08537AF-4F02-4040-999D-F0785CF64C02</string>
<string>C4F99E3D-1540-4BC1-8038-0A19D65BABC8</string>
<string>F2E2E79A-A85D-471D-9847-72AE40205942</string>
<string>20BDC055-ED67-4D0E-A47F-ADAA828EFF2B</string>
<string>F4FDFB3A-71EF-48A4-93F4-178B949546B1</string>
Expand All @@ -34,6 +35,7 @@
<string>422A59E7-FC36-4E99-B01C-6353515BB544</string>
<string>8A65E175-18F2-428F-A695-73E01139E41A</string>
<string>C04ED189-6ACB-44E6-AD5B-911B760AD1CC</string>
<string>FBC44B18-323A-4C00-A35B-15E41830C5AD</string>
</array>
<key>uuid</key>
<string>A46E4382-F1AC-405B-8F22-65FF470F34D7</string>
Expand Down

0 comments on commit c507324

Please sign in to comment.