[TxMt] Re: TODO bundle

graham.p.heath@gmail.com graham.p.heath at gmail.com
Wed Apr 30 19:18:45 UTC 2014

Select Bundle Editor from the application menu, this opens the Bundle Editor. Select Insert TODO List. Select All and Copy the command's code, I've included it here so theres no confusion:

#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/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}"

fallback = ENV['TM_COMMENT_START'].to_s.strip
print "#{e_sn fallback.sub(/.$/, '\\0 ')}TODO "
Now in the bundle editor select TODO -> Menu Actions, make a new bundle item (command + n), select Command from the drop down. Name it something appropraite, Insert TODO Code List perhaps.

Paste in the copied code, and change line 14 from

print "#{e_sn fallback.sub(/.$/, '\\0 ')}TODO"

print "#{e_sn fallback.sub(/.$/, '\\0 ')}TODO Code"
Now in the drawer, change Tab Trigger to your trigger, todoc for example. Now just make the rest of the settings for Insert TODO Code List match Insert TODO List's settings.

graham.p.heath at gmail.com

On April 30, 2014 at 1:23:24 PM, Ross Ahmed (rossahmed at googlemail.com) wrote:

Lets say I’m in an R file and I type “todo” + tab, the TODO bundle inserts this:


I want to be able to type “todoc” + tab, and have this inserted:

# TODO code

Or, “todoe”+ tab, and have this inserted:

# TODO edit

How can I edit the TODO bundle to be able to do this?


textmate mailing list  
textmate at lists.macromates.com  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20140430/8608407e/attachment.html>

More information about the textmate mailing list