forked from textmate/todo.tmbundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInsert TODO List.tmCommand
34 lines (32 loc) · 983 Bytes
/
Insert TODO List.tmCommand
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
<?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>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env ruby -wKU
require ENV['TM_SUPPORT_PATH'] + '/lib/escape.rb'
10.times do |n|
start = ENV["TM_COMMENT_START#{"_#{n}" if n > 0}"].to_s.strip
stop = ENV["TM_COMMENT_END#{"_#{n}" if n > 0}"].to_s.strip
unless start.empty? || stop.empty?
print "#{e_sn start}\n\tTODO $0\n#{e_sn stop}"
exit
end
end
fallback = ENV['TM_COMMENT_START'].to_s.strip
print "#{e_sn fallback.sub(/.$/, '\\0 ')}TODO "
</string>
<key>input</key>
<string>none</string>
<key>name</key>
<string>Insert TODO List</string>
<key>output</key>
<string>insertAsSnippet</string>
<key>tabTrigger</key>
<string>todo</string>
<key>uuid</key>
<string>D2F7F545-5149-47B9-AC62-DBDC6ACAB9BB</string>
</dict>
</plist>