Skip to content

Commit

Permalink
• this command inserts the start of a TODO list wrapped in block comm…
Browse files Browse the repository at this point in the history
…ent delimiters appropriate for the current language (now we just need ⌅ in the TODO list to insert the next item :) ).

git-svn-id: http://svn.textmate.org/trunk/Bundles/TODO.tmbundle@6819 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information
sorbits committed Mar 16, 2007
1 parent 8ca44da commit d4d8169
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Commands/Insert TODO List.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 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 &gt; 0}"].to_s.strip
stop = ENV["TM_COMMENT_END#{"_#{n}" if n &gt; 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>
13 changes: 13 additions & 0 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,24 @@
<string>Stanley Rost</string>
<key>description</key>
<string>If you tag your comments with &lt;tt&gt;TODO&lt;/tt&gt;, &lt;tt&gt;FIXME&lt;/tt&gt;, or similar, this bundle provides functionality to list all your tagged items, with the ability to jump to either of them.</string>
<key>mainMenu</key>
<dict>
<key>items</key>
<array>
<string>14C1643E-7D51-11D9-859D-000D93B6E43C</string>
<string>D2F7F545-5149-47B9-AC62-DBDC6ACAB9BB</string>
<string>------------------------------------</string>
<string>46C3E5A1-7E04-11D9-AE69-000D93B6E43C</string>
</array>
<key>submenus</key>
<dict/>
</dict>
<key>name</key>
<string>TODO</string>
<key>ordering</key>
<array>
<string>14C1643E-7D51-11D9-859D-000D93B6E43C</string>
<string>D2F7F545-5149-47B9-AC62-DBDC6ACAB9BB</string>
<string>46C3E5A1-7E04-11D9-AE69-000D93B6E43C</string>
</array>
<key>uuid</key>
Expand Down

0 comments on commit d4d8169

Please sign in to comment.