<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div>Works! Many thanks</div><div><br></div><div>Ross</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> "<a href="mailto:graham.p.heath@gmail.com">graham.p.heath@gmail.com</a>" <<a href="mailto:graham.p.heath@gmail.com">graham.p.heath@gmail.com</a>><br><span style="font-weight:bold">Reply-To: </span> TextMate users <<a href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a>><br><span style="font-weight:bold">Date: </span> Wednesday, 30 April 2014 20:18<br><span style="font-weight:bold">To: </span> TextMate users <<a href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a>><br><span style="font-weight:bold">Subject: </span> [TxMt] Re: TODO bundle<br></div><div><br></div><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><p>Select <code>Bundle Editor</code> from the application menu, this opens the <code>Bundle Editor</code>. Select <code>Insert TODO List</code>. <code>Select All</code> and <code>Copy</code> the command's code, I've included it here so theres no confusion:</p><pre><code>#!/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 "
</code></pre><p>Now in the bundle editor select <code>TODO</code> -> <code>Menu Actions</code>, make a new bundle item (<code>command</code> + <code>n</code>), select <code>Command</code> from the drop down. Name it something appropraite, <code>Insert TODO Code List</code> perhaps.</p><p>Paste in the copied code, and change line 14 from</p><pre><code>print "#{e_sn fallback.sub(/.$/, '\\0 ')}TODO"
</code></pre><p>to</p><pre><code>print "#{e_sn fallback.sub(/.$/, '\\0 ')}TODO Code"
</code></pre><p>Now in the drawer, change <code>Tab Trigger</code> to your trigger, <code>todoc</code> for example. Now just make the rest of the settings for <code>Insert TODO Code List</code> match <code>Insert TODO List</code>'s settings.</p><p><style>body{font-family:Helvetica,Arial;font-size:13px}</style><style>body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
padding:1em;
margin:auto;
background:#fefefe;
}
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
}
h1 {
color: #000000;
font-size: 28pt;
}
h2 {
border-bottom: 1px solid #CCCCCC;
color: #000000;
font-size: 24px;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 16px;
}
h5 {
font-size: 14px;
}
h6 {
color: #777777;
background-color: inherit;
font-size: 14px;
}
hr {
height: 0.2em;
border: 0;
color: #CCCCCC;
background-color: #CCCCCC;
}
p, blockquote, ul, ol, dl, li, table, pre {
margin: 15px 0;
}
a, a:visited {
color: #4183C4;
background-color: inherit;
text-decoration: none;
}
#message {
border-radius: 6px;
border: 1px solid #ccc;
display:block;
width:100%;
height:60px;
margin:6px 0px;
}
button, #ws {
font-size: 12 pt;
padding: 4px 6px;
border-radius: 5px;
border: 1px solid #bbb;
background-color: #eee;
}
code, pre, #ws, #message {
font-family: Monaco;
font-size: 10pt;
border-radius: 3px;
background-color: #F8F8F8;
color: inherit;
}
code {
border: 1px solid #EAEAEA;
margin: 0 2px;
padding: 0 5px;
}
pre {
border: 1px solid #CCCCCC;
overflow: auto;
padding: 4px 8px;
}
pre > code {
border: 0;
margin: 0;
padding: 0;
}
#ws { background-color: #f8f8f8; }
.send { color:#77bb77; }
.server { color:#7799bb; }
.error { color:#AA0000; }</style></p><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><p style="margin: 0px; font-family: Helvetica; "><br></p><p style="margin: 0px; font-family: Helvetica; "><br></p><p style="margin: 0px; font-family: Helvetica; "><br></p></div> <div id="bloop_sign_1398884743889651968" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br><a href="mailto:graham.p.heath@gmail.com">graham.p.heath@gmail.com</a><br></div></div> <br><p style="color:#000;">On April 30, 2014 at 1:23:24 PM, Ross Ahmed (<a href="mailto:rossahmed@googlemail.com">rossahmed@googlemail.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div></div><div><title></title><div>Lets say I’m in an R file and I type “todo” + tab, the TODO
bundle inserts this:</div><div><br></div><div># TODO</div><br><div>I want to be able to type “todoc” + tab, and have this
inserted:</div><div><br></div><div># TODO code</div><div><br></div><div>Or, “todoe”+ tab, and have this inserted:</div><div><br></div><div><div># TODO edit</div></div><div><br></div><div>How can I edit the TODO bundle to be able to do this?</div><div><br></div><div>Thanks</div><div>Ross</div><div><br></div><br>_______________________________________________
<br>textmate mailing list
<br><a href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a>
<br><a href="http://lists.macromates.com/listinfo/textmate">http://lists.macromates.com/listinfo/textmate</a></div></div></span></blockquote><p></p></div></div>
_______________________________________________
textmate mailing list
<a href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a>
<a href="http://lists.macromates.com/listinfo/textmate">http://lists.macromates.com/listinfo/textmate</a></span></body></html>