/
Move to EOL and Insert Terminator + LF.plist
66 lines (63 loc) · 1.77 KB
/
Move to EOL and Insert Terminator + LF.plist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>commands</key>
<array>
<dict>
<key>argument</key>
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>bundlePath</key>
<string>/Users/dpowers/Library/Application Support/TextMate/Bundles/Source.tmbundle</string>
<key>command</key>
<string>#!/usr/bin/env ruby
termchar = ";"
if ENV['TM_LINE_TERMINATOR']
termchar = ENV['TM_LINE_TERMINATOR']
end
# short for escape_snippet - escapes special snippet characters in str
def es(str)
str.to_s.gsub(/([$`\\])/, "\\\\\\1")
end
print es($stdin.read()[/^(.*?);*\s*$/, 1]) + "#{es(termchar)}$0"</string>
<key>fallbackInput</key>
<string>line</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
<string>~@</string>
<key>name</key>
<string>Move to EOL and Insert Terminator — Source</string>
<key>output</key>
<string>insertAsSnippet</string>
<key>scope</key>
<string>source</string>
<key>supportPath</key>
<string>/Users/dpowers/Library/Application Support/TextMate/Bundles/Source.tmbundle/Support</string>
<key>uuid</key>
<string>CA1849DD-D6EC-415D-8788-DD93BE027F6D</string>
</dict>
<key>command</key>
<string>executeCommandWithOptions:</string>
</dict>
<dict>
<key>command</key>
<string>insertNewline:</string>
</dict>
</array>
<key>keyEquivalent</key>
<string>$@</string>
<key>name</key>
<string>and Insert Terminator + LF</string>
<key>scope</key>
<string>source</string>
<key>scopeType</key>
<string>local</string>
<key>uuid</key>
<string>4AE1198B-5C41-4565-B432-BDB6EAB4910D</string>
</dict>
</plist>