<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 28 Feb 2006, at 06:47, Dr. Drang wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thanks to the helpful comments, I was able to put together a command</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">and macro combination that does just what I wanted. It's described in</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">some detail at</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://www.leancrew.com/all-this/2006/02/textmate_and_links_again.html">http://www.leancrew.com/all-this/2006/02/textmate_and_links_again.html</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV></BLOCKQUOTE><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Very good description on your blog!</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Following your questions on the list and the answers to it, I did the same yesterday, but with Ruby. </DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The only difference is that it increments the last id number and insert it instead of "id". That may interest you.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">When recording the macro, I added "ctrl + L" at the end, so it centers on the caret, I which I could do that automatically after I made a new link, I don't think it's possible though...</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">#!/usr/bin/env ruby</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">str = STDIN.read</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">n = str.scan( %r{.*\[(\d+)\]: }m ).to_s.to_i + 1</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">print "[${1:description}][${2:#{n}}]$0" + str.gsub(/[$`\\]/, '\\\\\1') + "[${2:#{n}}]: ${3:http://}\n"</SPAN></FONT></DIV></BODY></HTML>