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}"
    exit
  end
end

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"

to

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@gmail.com

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

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

# TODO

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?

Thanks
Ross


_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate