[TxMt] Re: How to use "Find in Project" functionality in a command (help appreciated)
Bert Fitié
bert at analytag.com
Tue Nov 7 11:26:36 UTC 2006
On Nov 7, 2006, at 9:23 AM, Jacob Rus wrote:
> Bert Fitié wrote:
>> 1. I'm a happy (64-year old, retired) enduser of textmate, not a
>> programmer.
>> 2. I'm using a textmate project as my "personal textbase". The
>> project has many markdown files. I don't use markdown as a source
>> to convert to html but as the real thing, as my final product
>> (with an occasional preview for reading convenience).
>> 3. My markdown file is a container for one or more articles, each
>> about a separate topic. Every article is uniquely identified by a
>> tag in the form of a string "tagid=<tagid>".
>> 4. I'm using crossreferences to other articles in the form of a
>> string "tagref=<tagid>".
>> 5. To link from a tagref to the associated unique tagid I use the
>> "Find in Project" dialog. I type "tagid=<tagid>" and click the
>> single link in the result to load the relevant file.
>> 6. I love to have the following command: with the caret in a
>> "tagref=<tagid>" reference and pushing the enter key, the relevant
>> file automatically loads.
>> 7. I have no idea how to make this command; help is appreciated.
>
> Instead, I suggest using regular (relative) markdown links for your
> cross-references, and just using the regular syntax, as you would
> with any other links. That way, we can instead make a command
> which opens a general markdown link, either in the browser if it's
> an html page, or in an image editor/textmate if it's a local file.
> I've personally wanted such a command for a long time.
>
> -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
I second your suggestion, it would be a nice addition to markdown.
The present <URL> construct in markdown cannot be used for regular
local links since it does not allow local URLs like file:// or
txmt://. Only internet links like <http://..> or <ftp://..> are
supported.
This does, however, not solve my problem. Using a regular markdown
link requires knowing the file that contains the relevant article.
But I want the articles to be agnostic about their file container.
When I reorganize my articles (for example, because they grow or
shrink in size) I may combine them in the same file or put them in
different files). Whatever I do, I don't want to update my links.
That's the reason that I'm using a 'tagid' as identifier for an
article and 'tagref' as reference and that I link on basis of a
search (I don't know the file, only that it is in my project). So I
still have good use for the proposed command and a need for "Find in
Project" functionality for this command.
More information about the textmate
mailing list