Works! Many thanks
Ross
From: "graham.p.heath@gmail.com" graham.p.heath@gmail.com Reply-To: TextMate users textmate@lists.macromates.com Date: Wednesday, 30 April 2014 20:18 To: TextMate users textmate@lists.macromates.com Subject: [TxMt] Re: TODO bundle
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.