[TxMt] Re: TODO bundle
Ross Ahmed
rossahmed at googlemail.com
Thu May 1 09:04:58 UTC 2014
Works! Many thanks
Ross
From: "graham.p.heath at gmail.com" <graham.p.heath at gmail.com>
Reply-To: TextMate users <textmate at lists.macromates.com>
Date: Wednesday, 30 April 2014 20:18
To: TextMate users <textmate at 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.
--
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:
>
> # 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 at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
_______________________________________________ textmate mailing list
textmate at lists.macromates.com http://lists.macromates.com/listinfo/textmate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20140501/513f7f37/attachment.html>
More information about the textmate
mailing list