[TxMt] Re: How to use "Find in Project" functionality in a command (help appreciated)

Bert Fitié bert at analytag.com
Tue Nov 7 19:30:32 UTC 2006

1. Jacob, thanks very much. With these suggestions I can satisfy my  
requirement in the following way without the need for a new command  
(which is a relief for me):
2. My "tagid=<tagid>" string which identifies (and indicates the  
beginning of) an article remains as it is.
3. The file and line of this string, however, I store in an easily  
maintainable central file (to be included in al my markdown files via  
tminclude) in the following way: [<tagid>]: txmt-url-with-file-and-line
4. My "tagref=<tagid>" string I change into "tagref=[<tagid>][] using  
markdown's implicit link name short cut
5. I tested it out and it works, both form the markdown file itself  
and from the preview.

-- Bert

On Nov 7, 2006, at 4:47 PM, Jacob Rus wrote:

> Bert Fitié wrote:
>> Interesting idea, Jacob, I will look into it.
>> I see a disadvantage with this solution. It will load the relevant  
>> file, but unless the article I'm linking to is the first (or only)  
>> one in the file and is at the top, I have to find it further down.  
>> My method (still manually, though) brings me direct to the  
>> "tagid=<tagid>" line which is the start of the article. Attaching  
>> line info to the URL is no option since it changes too often and  
>> is not maintainable.
> I don't actually understand what you mean here... If you hop onto  
> IRC, we can more easily discuss this.
> Your method gives a "tagid" to each file.  I think we can do the  
> same thing here, by making the reference name «refname» (as in  
> [link text][«refname»]) essentially the tagID that you are using  
> currently. The only difference is that a) this link will render  
> correctly in the html, and 2) It's legal markdown syntax, as  
> opposed to your system, which is a (rather arbitrary) extension.
> So to summarize, you link all the documents using the reference  
> names that you want to use as tag IDs, and then if you want, you  
> can change where those references point to, and easily update those  
> pointers at the bottom of every file, and voila, your problem is  
> solved :).  The only tricky bit then is figuring out how to get all  
> the links at the bottom of each page to be updated.  I think this  
> will be easy enough to make in a simple little script.  So what you  
> end up with is one document which includes all of your link  
> definitions, which match reference IDs up with file locations, and  
> you include that document in every other document.
> -Jacob
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate

More information about the textmate mailing list