Following are two Perl snippets that cause syntax highlighting to get
wacky.
This first one causes everything that comes after for the remainder
of the file to be colored as a string:
message(<<EOF) if $TT_PREFIX;
EOF
And with this one, as well as the one above, anything after the first
here-doc delimiter is colored as a string:
$sql .= <<SQL if $type eq 'com';
SQL
Regards,
Michael Irwin
Please please Allan include block undo/redo. At least as an option.
Not only is it standard on all other programs (that I know of) I find
it far more usable. If I want the latest character I typed undone,
I'll hit backspace.
I currently sit and try to figure out a good XML scheme for myself,
and I find that I change whole words very much, such as tag-names and
allowed values for attributes, it's a pain to hit the undo button so
many times as is necessary.
Andreas
Hi,
I discovered db_structure in Rails last night, as a way of creating
SQL files once instead of once for each database type. And so I've
mangled together a language for it, basically stealing the rhtml
syntax and modifying it to include 'source.sql' instead of
'text.html.basic'. Hopefully I've done right -- it appears to work.
I've attached it in the hope that other folks might find it useful
and that it might wind its way into the svn Ruby bundle sometime?
Regards,
Graeme
--
Mail: mathie(a)woss.name | Web: http://woss.name/
AIM: Math1e | PGP: 1024D/D72F2737
I create a new file with ISO-8859-1 (Latin 1 or Windows) encoding selected,
either by doing a Save As.. with ISO-8859-1 selected or setting the File
Encoding to ISO-8859-1 in Preferences.
I close the file and reopen it. It's not opening in ISO-8859-1. Does Text
Mate reopen all files in UTF-8 event though ISO-8859-1 is specified in
Preferences or the file was save as ISO-8859-1?
Thanks,
Ed
Hi Allan,
got a bug for you (unless it's a feature I don't get)
release 540
c++ file
after editing for a while with file open in 2 windows (in fg, file
was in a temp project) switched to bg window (lone file), and
scrolling there moves the cursor offscreen -- ie, the window won't
scroll. Window has no scrollbars. Cmd-L takes cursor to line xx
offscreen as well. In the other window (same file, in temp proj)
scrolling works fine. Pg down has no effect.
Resising window fixed it (redrew scrollbars; keyboard motion now
makes window scroll)
****
update: i can recreate this. it occurs when a window has no
scrollbars & you edit (vertically enlarge) the same file in another
window (eg drag its icon into a temp. project & edit) such that it
needs scrollbars - the original window must be resized or window
scrolling is disabled.
scuse me if this is known
cheers,
David
Summary
Folding should count fold start/stops at the current indentation
level to properly pair a fold start with a fold end.
Details
With my Lua bundle, I have folding set to work for block comments and
functions (among other things).
If 'v' represents a start fold marker, and '^' represents and end
fold marker, then creating an unindented (column 0) function looks
like this:
v function foo( )
print( 'hey' )
^ end
So far, so good. Now, suppose I block comment out this function
(without indenting it):
v --[[
v function foo( )
print( 'hey' )
^ end
^ ]]
This looks correct, but if I toggle the first folding marker, I get
this:
> --[[•••
^ ]]
In other words, the folding looked for the first end marker that was
at the same depth as the start marker, and (incorrectly) used the
'end' line. Instead, I propose that it should scan down and when it
sees the second start fold marker at the same depth, add 1 to a
counter; when it sees the first close fold marker at that depth, it
checks the counter...since it is non-zero, it subtracts one. Finally,
when it sees the last fold marker, and the counter is at zero, then
it uses that as the correct, paired end fold.
P.S. What's the netiquette/guideline regarding attaching screenshot
images inline to an email message to a mailing list, when that
mailing list is almost certain to be used solely by MacOS users, who
likely are using a Mail program that would support them? Would have
been easier than the ascii art above (which itself is non-plain text,
so I'm violating another common mailing list rule there).
Saw that this bundle was edited by Allan on 11 october, to remove the
F1 key, bundle found here;
http://anon:anon@macromates.com/svn/Bundles//trunk/Bundles/
PHPCodeCompletion.tmbundle/Commands/Insert%20Snippet.plist
Is this somehow "official" now, I installed that bundle (and manually
removed the F1 key from it) ... I tried removing it from my bundles
directory and restart TextMate, but I lost funcionality and coludn't
find it in the "more bundles" button either, so I suppose it's not
yet in the build as such?
Andreas
Hi,
I'm trying to see if I can manage without eclipse in my daily
workflow. I'm not sure if I'll be able to do without it completely,
as it does nice stuff like popup function name completion etc. that
really need the editor itself to be written in Java. I should be
able to do without it for my view code and (server-side) javascript.
One thing I miss from XMLBuddy (eclipse plug-in) is Ctrl-space to
close the current tab. e.g. if the editor looked like this:
<div>some text|
and you hit ctrl-space, it would append </div> to that line. Has
anyone written a macro to do that? I would imagine it could get
quite complicated, XMLBuddy will still append </div> even if the edit
buffer looks like this:
<div><p>some text</p>|
so it isn't just reading back to the first <:alpha:+>.
I know about the <[tab], >[tab] and <a[tab] snippets, but I always
forget to use them. I could probably learn, given time...
Jon
I am a beginner with textmate, and I wondered where I could
get soem kind of tutorial for it. Not for the basic editing
fuvnctions, but for customization, what textlate can do apart
editing, etc.
I tried the wiki, but I'm much more at ease with a document I can
print and read. Is tehre something like that ?
--
Erwan David