I never noticed this issue before, but if I have a php file with html
in it like so:
<html>
<head></head>
<body>
<div>
<?
echo "hello world";
?>
</div>
<body>
</html>
I get code colorization to the first div tag the closing div, body
and html tags go uncolorized - is this just me? I'm thinking this is
a new issue, because I've never noticed it before?
-saul
To commands that I think would be awesome (since the last time I made
a request my project drawer got all colorful :0)
has anyone attempted to match the functionality of markupmaker
(http://www.accessify.com/tools-and-wizards/developer-tools/markup-
maker/)
as a textmate command? -- my head would explode if somebody had that
handy (seriously EXPLODE!)
- saul
I've just attempted to add folding for POD to TM's Perl language
definition - forgetting that I've already tried it previously. POD
looks like this:
=head1 A heading
=head2 A sub heading
=cut
The =cut always ends the POD. So my patterns look like ^=(?!cut) and
^=cut\s*$ respectively. That doesn't work because the folding
mechanism expects a recursive syntax - each opening 'thing' requires
its own closing 'thing'.
So I was thinking about how the problem could be solved and it
occurred to me that it'd be interesting to have an extension to
regular expression syntax that allowed an assertion to be made about
the matching scope.
Assuming the assertion was called ?^ you could match the text 'foo'
only in storage.type.sub.perl or entity.name.function.perl with
something like this:
(?^storage.type.sub.perl|entity.name.function.perl:foo)
Generally (?^ <scope re> : <re> ) would allow <re> to match only if
the current scope name matched <scope re>.
To solve my folding problem the code that scans for folds would have
to be scope aware - which may not be feasible architecturally.
And I realise that extending RE semantics to grok rich text is a bit
of a big undertaking - but I thought it was a cute idea :)
--
Andy Armstrong, Hexten
The Completion command shortcut ⎋ (the most important command to me)
was gone. Then I discovered that I can assign a new Menu command via
System Preferences. I assigned ⌘⎋ ant it becomes to work again!
- Juan Falgueras
hi :)
i've written some classes in php and would like to document my methods
so i'm typing in doc_fp, hit tab and voila:
/**
* undocumented function
*
* @return void
* @author /bin/bash: niutil: command not found
**/
8-)
i can't remember seeing this before i switched to leopard ( format +
install ) but what is that command? netinfo-something?
regards,
oktay.
Hi,
I encountered a tiny bug in the Ruby code for: "Insert Close Tag"
If one has he following HTML code:
<HTML><HEAD><TITLE>foo</TITLE></HEAD><BODY>
<HR>
and press OPT+APPLE+. it will insert </HR> not </BODY>.
The reason is here:
# remove all self-closing tags
if ENV.has_key?('TM_HTML_EMPTY_TAGS') then
empty_tags = ENV['TM_HTML_EMPTY_TAGS']
before.gsub!(/<(#{empty_tags})\b[^>]*>/, '')
end
The regexp is not case insensitive! TM_HTML_EMPTY_TAGS are written in
lower case only.
Ergo:
# remove all self-closing tags
if ENV.has_key?('TM_HTML_EMPTY_TAGS') then
empty_tags = ENV['TM_HTML_EMPTY_TAGS']
before.gsub!(/<(#{empty_tags})\b[^>]*>/i, '')
end
Cheers,
--Hans
lo there all,
i am brand new to textmate. I love it !
My only issue is that when i am editing a project on a remote
computer, i get a lot of spinning beach ball action while something is
going on. From what i have found on google, it is checking to see if
any files have changed.
Now, i saw mention of a remote project plugin, but i could not find a
way to download it.
Has someone found a good solution for this ? I am working on a ruby on
rails project on a remote server.
thanks all, and great editor / IDE you have here..
shawn
Hi,
Heureka!
I found a way to select something - calculated on run-time - by using
a normal macro (plus command) without TMTOOLS!!
The problem was if I have a script which outputs a text chunk or a
regexp how can we select that text/regexp in a TM window?
The approach is actually very simple. I copy the text/regexp into the
shared find pasteboard; place the caret to a proper location; and
execute 'findNext'. Thus I wrote a tiny C program which copies a
string into the shared find pasteboard. OK, then I wanted to write a
man page for that command on basis of the normal pbcopy man page, and
I figured out that pbcopy is already able to do this ;)
Fine. The only problem was that if I write a tmcommand à la:
echo -en "FINDTEXT" | pbcopy -pboard find
it doesn't work because "pbcopy -pboard find" is called from inside
of TM. If I execute that in a Terminal, switch back to TM it works.
The solution: I have to execute this in a new bash environment.
The basic tmcommand (example name "SELECTTEXT"):
RESULT=$(A SCRIPT WHICH RETURNS A TEXT OR REGEXP)
export RESULT
/bin/bash -c 'echo -en "$RESULT" | pbcopy -pboard find'
#place the caret to a proper location to be able to execute 'findNext'!
open "txmt://open/?line=$LINE&column=$COLUMN"
After executing that command the string $RESULT is in the shared find
pasteboard, and the caret is set.
Next step > the macro:
Before we can execute 'findNext' (= APPLE+G) we have to set the
parameters of the find panel, meaning whether we want to do a regexp
search or not; ignore case or not.
Thus record a macro à la:
1) open find panel, set the desired parameters, and do a dummy search
for something which is NOT in the document -e.g. look for \xFFF3; and
close it
2) execute the command "SELECTTEXT"
3) APPLE+G
That's it. The nice side-effect is that the macro changes nothing
within TM's find panel ;)
And the macro does not affect the undo buffer, it does not change the
text etc., and the selection is done instantly.
But attention:
The only tricky point : Be aware of correct escaping!!
On that basis I wrote the "Select XML/HTML balanced tags" script
which will come as soon as possible. I only have to fix some tiny
things.
Comments?
Regards,
--Hans
El 21/11/2007, a las 13:00, Robin Houston escribió:
> Shouldn't the search string be ¥([^¥]*)¥ instead of what you have?
> Yours is just looking for a single character between the Yen signs. I
> tried my regular expression, and it seems to work even when there are
> backslashes.
of course :]. Thanks Robin.
-Juan Falgueras