-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathenum field.tmMacro
62 lines (59 loc) · 1.39 KB
/
enum field.tmMacro
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
<?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>commands</key>
<array>
<dict>
<key>command</key>
<string>moveToEndOfParagraph:</string>
</dict>
<dict>
<key>argument</key>
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env ruby18
if ENV['TM_CURRENT_LINE'] =~ /^\s*[\w.]+\s*=\s*(\d+)\s*[,;]?\s*$/
idx = $1.to_i + 1
else
idx = 1
end
if ENV['TM_CURRENT_LINE'] =~ /^\s+/
indent = ''
else
indent = "\t"
end
puts
print "#{indent}${1:FIELD} = ${2:#{idx}},$0"
</string>
<key>fallbackInput</key>
<string>line</string>
<key>input</key>
<string>none</string>
<key>keyEquivalent</key>
<string></string>
<key>name</key>
<string>enum field</string>
<key>output</key>
<string>insertAsSnippet</string>
<key>scope</key>
<string>meta.enum.thrift</string>
<key>uuid</key>
<string>841E598E-C872-4A98-A4D5-F13272F51B6F</string>
</dict>
<key>command</key>
<string>executeCommandWithOptions:</string>
</dict>
</array>
<key>keyEquivalent</key>
<string></string>
<key>name</key>
<string>enum field</string>
<key>scope</key>
<string>meta.enum.thrift</string>
<key>uuid</key>
<string>C334A09A-D090-4EC1-AD14-23FB9AF4D287</string>
</dict>
</plist>