I've been using the macro below on my laptop with TextMate for quite a
while, and just realized I didn't have it on my G5. I went to record
it and ended up having a terrible time. It seems that with newer
versions of textmate (I couldn't tell you which version I was on when
I recorded it on my laptop) when you record the macro below, it adds
an "insert text" command with whatever tag has been inserted.
The macro:
In an HTML document, type < (it inserts <>, but ignore
that), now do:
1) Automation / Start Macro Recording
2) Backwards delete (to delete <, which also removes >)
3) Automation / Insert Closing Tag
4) Automation / Stop Macro Recording
Now save this macro, give it key equivalent /, and here's the sneaky
part: set the scope to: text.html invalid.illegal.incomplete
The scope controls when the macro should "fire", and if you press
ctrl-shift P inside <>, you'll see the scope of that position, which
is what's quoted above. So only inside <> will / fire this macro,
which first removes the <> and then inserts the closing tag.
In newer versions, instead of just coming out with
deleteBackward:
insertClosingTag:
it also adds
insertText: </html> (or whichever tag you happened to be closing)
I was able to open up the recorded macro in the Property List Editor
and remove the third command, but that is not a very elegant solution.
This was working properly in the past!
-Kevin
Hi,
I suspect you're going to say 'no, it's a limitation of the way the
parsing is done', but would it be possible to collapse white space in
the display of symbols? See the attached example. The file itself
has these items being split by a newline and indentation...
Actually, on a related note, it would be really nice if the auto-
indentation would behave in the way I want it to for indented
function arguments. That is, if I hit enter inside an open bracket,
the next line should be indented to one beyond the open bracket on
the previous line. And when the corresponding closed bracket
happens, the indentation should revert to what it was before. As an
example:
tickets = self.sql.listTickets(ticket_id = id,
/* Caret should be placed at the
'/' of this comment. */
support_of = 123,
account = 'foo(a)acmewidgets.example')
/* Caret should be placed at the '/' of this comment. */
Is it possible to do this?
--
Mail: mathie(a)woss.name | Web: http://woss.name/
AIM: Math1e | PGP: 1024D/D72F2737
I do a lot of coursework for University in Textmate - which means I'm
always printing out my code for marking. Thing is, currently, I'm
having to switch over to Xcode to print each time so I can do so in
Colour. It makes it a ton easier for the marker.
Is there any chance Textmate could support colour printing and also
being able to set the text size and font?
Dave Winter
http://commanderbond.net
On 06/12/2005, at 15.45, Jamal Johnson wrote:
> i'm sure there's been discussion of this before, but was wondering
> if there was anyway to add a preference to have the tabs for the
> open files of a project wrap to multiple lines instead of limiting
> them to one line
I'm pretty sure the conclusion was that it's a bad design element to
have multi-line tab bars. I at least dislike it in Windows, and it
could also be hard to make it look 'right', but... :-p.
-- Sune.
yeah, from the quick research i did that's what most people were saying.
however, having it as a 'checkbox option' in the prefs would give those who
believe it's bad design the ability not to use it, and those who like it
that way the ability TO use it. but from what i also read, it might be a
little hairy to implement...
On 12/6/05, Sune Foldager <cryo(a)cyanite.org> wrote:
>
> On 06/12/2005, at 15.45, Jamal Johnson wrote:
>
> > i'm sure there's been discussion of this before, but was wondering
> > if there was anyway to add a preference to have the tabs for the
> > open files of a project wrap to multiple lines instead of limiting
> > them to one line
>
> I'm pretty sure the conclusion was that it's a bad design element to
> have multi-line tab bars. I at least dislike it in Windows, and it
> could also be hard to make it look 'right', but... :-p.
>
> -- Sune.
>
>
Hi,
Outliners are a good tool for organising many things.
I strive to keep everything in plain text.
The best outliner to my tastes that I've found so far is Vim's
excellent outliner mode.
http://vimoutliner.org/
It does that vim 2-keystrokes-and-you've-rearranged-the-furniture
thing to a tee (tea? T?). There's also a unix tool called hnb (not
sure if it's on OS X):
http://hnb.sourceforge.net/Links/
My question is, does anyone here on this list use, or hope / intend
to use, TextMate as an outliner? I mean, you could almost use the
drawer alone, but that kind of inverts the plain text thing (plain
file nodes, anyone?)
has anyone got any ideas on how TM could be scripted / used as-is /
etc to facilitate use as an outliner? I only get to use TM / OS X at
home (working on it though ..), so any advice from more practiced TM
users appreciated.
cheers,
David
Hi all!
Is it possible that whenever TM is invoked from a Spotlight query, it
automatically jumps (when present) to the first occurrence of the
search term(s)?
I've had a look at Apple's documentation on the developer site, but
not found any information on whether it's possible, although
Preview.app certainly does it for PDF documents.
Thanks,
Daniel.
Hi,
I don't suppose it would be possible for Textmate to make an attempt
to 'guess' the tab size (and whether the file is using hard/soft
tabs) when a file is opened? I often wind up editing other people's
code and, usually, they wind up using something other than 'soft
tabs: 2'. So I regularly have to fiddle with the tab size to make
things match up nicely.
ISTR a previous editor I've used, WingIDE[1], having this feature,
and it was really handy... And no, that's not an 'every other editor
does it' -- it's the only time I've seen that feature, but it was
really useful!
Oh, even better! I'm looking at the code for Typo just now, and it's
not even consistent throughout the code! In fact most of it is 'soft
tabs: 2', just views/articles/taglist.rhtml (the first one I happened
to want to edit) that's using hard tabs...
[1] http://www.wingware.com/
--
Mail: mathie(a)woss.name | Web: http://woss.name/
AIM: Math1e | PGP: 1024D/D72F2737
There is no bundle for Verilog HDL, but it has a lot in common with C
and Pascal, so I duplicated the C language and have been hacking on
that to get the syntax coloration mostly working. I've run into a bit
of trouble with the constant expression syntax though. In Verilog
constants have this form:
8'b00100011 (8 bit binary)
6'o35 (6 bit octal)
12'h3A2 (12 bit hex)
The initial number is optional, so 'b10110 would be a 5 bit binary
constant. In addition to numbers, z and ? can also appear sometimes to
indicate high impedance or indeterminate values. I've tried the
following syntax for the binary constants:
...|([0-9]*)\'b[0-1zZ\?]*)|...
When I hit the test button it highlights everything from the b on. I'm
guessing it is not able to escape the single quote. I've also tried
escaping the b as well and it didn't make any difference. Is there a
way around this? Is there somewhere I can find the detailed syntax
rules for the matching expressions and bundles in general? I did a
quick look through the WIKI and didn't see anything obvious.