I'm trying to get TextMate to open some html returned from a perl
script with little success.
If I create a new command and type:
echo "<html> ....etc ....etc </html>"
with the Output set to show as HTML everything works fine. However
with the results from the perl script nothing happens. The command
simply reads:
$TM_BUNDLE_PATH/Tools/returnHtml.pl
When the output is set to "Open as new document" or "Show in separate
window" I get to see the raw html without any trouble.
I've check other bundles for examples and searched the archives but
can't see where I'm going wrong, can anyone help?
Cheers,
Simon
The theme booming seems sadly over, it was fun :)
So I'm doing what I can to spice it up again, don't know if this is
good, or who'd want to use it, but here it is. Except for the
comments, all colours are "extremes", that is, either 0 or 255 on the
RGB scale. One possible idea would be to have blue for comments, but
I just couldn't stand to loose the standard grey. I based it on
Allans MagicWB theme and changed the colours (that is to say, both
themes address the same scopes).
Andreas
I currently have NO custom bundles except PHPcodecompletion (in ~/
Library/Application Support/TextMate/Bundles), and still nothing
shows up in js, php or html files. js files have several types of
functions, html/php has divs, images and form elements. I did get
symbols in a css file ...
Any ideas? Going on version 513
Andreas
Hello,
I tried typing txmt://open?url=file:// in a new window and it opened
a new window when I typed the last slash. It looks like its trying to
execute the url.
- Juan
I'm a bit torn what the "correct" behaviour would be in this case,
but when I open an existing file in TM, then move that file and save
it, then it appears wherever I opened it from originally, not in the
new location.
I thought TM checked the status of open files, or does that only
apply for projects?
Daniel.
It seems the syntax parsing chokes on heredocs, code provided below
<?php
$xmlstr = <<<XML
<?xml version='1.0'?>
<movies>
<movie>
<title>PHP: Behind the Parser</title>
<characters>
<character>
<name>Ms. Coder</name>
<actor>Onlivia Actora</actor>
</character>
<plot>
So, this language. It's like, a programming language.
Or is it a
scripting language? All is revealed in this thrilling
horror spoof
of a documentary.
</plot>
<rating type="thumbs">7</rating>
<rating type="stars">5</rating>
</movie>
</movies>
XML;
$xml = simplexml_load_string($xmlstr);
echo "<p>" . $xml->movie[0]->plot . "</p>";
?>
example taken and trimmed slightly from
http://se.php.net/simplexml
Andreas
I decided to just make my own Lua module, by hacking an existing
module and (for now) making up my own UUID. I'm 95% done, but for two
(related) issues:
In Lua, you can have a multi-line string delimited by [[ ... ]]. For
example:
local theMessage = [[
Hello world
How are you doing?
]]
I've got that one covered. However, Lua is tricky and allows you to
have nested [[..]] pairs within this block. So, for example:
local theExample = [[
Hello world
In Lua, a string can contain nested [[...]] pairs.
This includes a case like [[ hi [[ there ]] ]]
More string]]
Is it possible to do this? I don't think so in general PCRE, but
didn't know if TextMate or Oniguruma had some sweet balancing.
Right now I have:
{ name = 'string.quoted.multiline.lua';
begin = '(?<!--)\[\[';
end = '\]\]';
swallow = '\[\[(.|\r)*?\]\]|\\.';
},
which handles a single pair of [[..]] on the same line inside a
block, but doesn't handle multiple nesting or (for reasons I don't
understand) handle a single pair across multiple lines. Where can I
find more information on the 'swallow' bit?
I am in the midst of creating a Tcl mode for Textmate. I was wondering
how I would do the following in the language code:
mk::create
Often in Tcl a namespace will be like the above a word followed by a
:: followed by a word. How would I get Textmate to color the entire
"mk::create".
Just found out about Textmate while looking at the TurboGears
framework, which also got me interested in Python. : )
Robert