[TxMt] Insert File/Path names + open a file without using a GUI
Hans-Joerg Bibiko
bibiko at eva.mpg.de
Mon Mar 12 08:49:36 UTC 2007
On 12 Mar 2007, at 01:43, Charley Tiggs wrote:
> Hans,
>
> I think misunderstood the example So I'm going to try again.
>
> Given your project example below, let's say I want to create a
> hyperlink in a.html to the file '/images/1.jpg'. I would not want
> '/usr/local/src/web' as part of the input.
OK I see.
> Given your project example below, when I enter '=/i' and hit CTRL
> +TAB, given that the $TM_PROJECT_PATH is known, and given that I'm
> creating a link within html, shouldn't the insertion only be '/
> images'?
>
Please forgive me if I'm totally wrong. If I want to insert a
hyperlink in 'a.html' to '/images/1.jpg' then I would write
href="../../images/1.jpg" because my current document's path is the
starting point of the file hierarchy. And this is supported.
If you want to that as default, meaning press only CTRL+TAB will show
you the content of $TM_PROJECT_PATH instead of $TM_DIRECTORY, well
this could be done by using a kind of mode switch (maybe as user-
defined TM variable).
> I think I'll try modifying the command myself to see if I can
> accomplish this. As the tool stands, it's extremely useful. Thanks
> for an awesome beginning!
Best, Hans
>
> Hans-Jörg Bibiko wrote:
>> One moment please.
>> Charley: back to my example
>> Project Example:
>> root (path='/usr/local/src/web')
>> |
>> |-css
>> | |- a.css
>> | |- b.css
>> |-images
>> | |- 1.jpg
>> | |- 2.jpg
>> |-main
>> | |-includes
>> | | |-j.js
>> | |-htmls
>> | |-a.html
>> My current document is 'a.html'. I type:
>> '=/c' ; press CTRL+TAB ; the command will insert: '/usr/local/src/
>> web/css'
>> You said '=/c' should only insert '/css'.
>> One humble question: What would be written in 'a.html' before '=/c'?
>> Could it be that this line in a.html contains a TM_* variable?
>> Otherwise it wouldn't make a sense to me (?)
>> If so, I implemented this for TM_SUPPORT_PATH and
>> TM_BUNDLE_SUPPORT. If one of these variables is before my caret
>> and I invoke the completion the command shows its content (see my
>> screencast). To expand that mechanism to other variables would be
>> easy.
>
More information about the textmate
mailing list