[TxMt] Re: How to do basic things with files and project drawer

Hans-Jörg Bibiko bibiko at eva.mpg.de
Tue Sep 15 08:42:12 UTC 2009


On 15 Sep 2009, at 07:55, Fabio wrote:

> 1. New Project
>
> [...]
> The question: is there any way to have the paths set from my "root"
> element?
> For example if I drag an image that is placed into /myroot/img/ the
> html file that gets it uses a src link like "../../img/image.gif". Is
> it possible to have "/img/image.gif" instead?

I do not quite understand. But if you drag eg an image from the drawer/ 
Finder to an HTML document TextMate will insert the relative path seen  
from that HTML document, this ensures that the HTML doc can see the  
image file later on.


> 2. Project Drawer and new files in project
>
> How can I create a new file or duplicate an existing one?

If you did select the file in question simply press ⇧⌘S (Save As)  
to duplicate it.


> 3. While I editing CSS or HTML files, sometimes I need the color
> chooser, the default keys CTRL + SHIFT + C do not open it. That keys
> seems to be used by the default Math bundle. Is the solution to
> manually change such keys in Math bundle? Why TM provides such
> overlapping keys?

TextMate doesn't listen on the ⇧^C, thus deleting that short-cut in  
the Math bundle won't work.

If you're inside a CSS doc or inside a CSS scope (ie if your caret in  
inside of "<style type="text/css">…</script> of an HTML file) press  
⇧⌘C. From others ^⎋ > CSS > Insert Color…


> 4. A little "bug" with file tabs
>
> When opened files number exceed TM window width, other files are
> visible under the ">>" button of tab list. Unfortunately if you need
> to work on a file listed in ">>", you cannot see it selected in the
> tabs so it is difficult sometimes to know on wich file you are working
> or where it is placed.

> The window title gives you the file you are working on.  Command click
> on the title gives you the full path to the file (standard mac
> behaviour).

In addition ^⌘R will select the current doc in the drawer.

If you need your own way to display the name simply create a new  
tmcommand in the bundle editor:
Input: Discard:
Output: Show as Tooltip
Command:
echo "$TM_FILEPATH"

and bind it to any short-cut.

Ciao,

--Hans




More information about the textmate mailing list