Allan,
First, thank you for creating such a wonderful editor. I've been using
it full time for almost a year now and love it very much.
I've been trying to be mouse less when doing development with TextMate
and iTerms. One thing I feel a little inconvenient is when I have
opened too many tabs, I can not drag files from vertical list to tabs.
Also, there is no keyboard shortcuts to move current tab to re-order
tabs. Please add them to your feature requests if you feel they are
interesting.
Regards,
Cao
I keep seeing this message pop up from time to time, looks to be a
growl notification. Usually at boot, but I've seen it at other random
times.
Anyone have any insight as to what this is? I suppose it's nice that
my bundles are up to date, but I'd rather not have something updating
my bundles without my OK. Looking around in the standard places for
launch at boot items, crontabs, etc. I don't see anything that would
do this.
-Dave
I've asked this before and didn't get an answer that I understood, so I'm
trying again.
My bundle consists of a bunch of ruby scripts, and the output is shown as
HTML. Thus, when a command is given, I am running a ruby script and then
scrambling to transform any output for display as HTML, deal with
exceptions, etc. In other words, I am doing simply and crudely what RubyMate
already does perfectly.
So the question is, isn't there some way I can just *use* RubyMate to run my
scripts and display output and exceptions for me?
m.
--
matt neuburg, phd = matt(a)tidbits.com, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
On Sat, Jul 4, 2009 at 6:00 AM, <textmate-request(a)lists.macromates.com> wrote:
> ---------- Forwarded message ----------
> From:Â Scott Haneda <talklists(a)newgeo.com>
> To:Â TextMate users <textmate(a)lists.macromates.com>
> Date:Â Fri, 3 Jul 2009 12:40:55 -0700
> Subject:Â [TxMt] Re: The dreaded Regexp question
> On Jul 3, 2009, at 10:00 AM, Michael Newton wrote:
>
>> Sorry, I know this isn't particularly on-topic (aside from the fact
>> that I'm using Textmate!) but I'm not having luck with the search
>> engines.
>>
>> I have a bunch of HTML that needs to be converted to XHTML, notably
>> <input type="text"> needs to be <input type="text"/> which is easy
>> enough. Problem is, it's PHP so there are things like <input
>> type="<?php echo $type?>"> which I'm having troubles with. So how can
>> I create a regular expression that captures the guts of the HTML
>> brackets, while ignoring any PHP brackets it might come across inside
>> the HTML?
>
>
> I used this web tool to help me:
> http://www.gskinner.com/RegExr/
>
> I did my best to put in single tics, quote marks etc:
> <input type="<?php echo $type?>"> some type and then another input <input type="<?php echo $type?>" name='value' class="foo">
> <input type="some_value">
> <input type="$some_$value">
> <hr>
> <br>
>
> My regex pattern was:
> (</?\w+)((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)/?(>)
>
> My replace pattern was:
> $1$2$3/>
> * You could do less pattern grouping, I did so as I was working through it.
>
> Result was:
> <input type="<?php echo $type?>" type="<?php echo $type?>"/> some type and then another input <input type="<?php echo $type?>" name='value' class="foo" class="foo"/>
> <input type="some_value" type="some_value"/>
> <input type="$some_$value" type="$some_$value"/>
> <hr/>
> <br/>
>
> The one issue is it will alter plain closing tags, like </a> will become </a/> and I could not wokr that out. Â Either you can solve that in the regex by ignoring anything with a "/" in it already, or, I may be inclined to cheat. Â With the recording ability of textmate, I would try something like:
> find "/>"
> replace "#tmp#
> find (</?\w+)((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)/?(>)
> replace $1$2$3/>
> find "#tmp#
> replace "/>"
>
> It should happen pretty quick.
> --
> Scott * If you contact me off list replace talklists@ with scott@ *
>
Thanks, I actually figured it out just now as I was composing a reply.
Negative lookbehind assertion only matches ">" if it's not preceded by
"?" or "/":
find: <((?:input|img|link|meta|hr|br|area).*?)(?<![?/])>
replace: <$1/>
turns this:
<input name="foo"<?php echo $bar?>>
<input name="foo" value="<?php echo $foo?>">
<input name="foo" <?php echo $bar?>/>
<input name="foo" value="<?php echo $foo?>"/>
<a href="bar">baz</a>
into this:
<input name="foo"<?php echo $bar?>/>
<input name="foo" value="<?php echo $foo?>"/>
<input name="foo" <?php echo $bar?>/>
<input name="foo" value="<?php echo $foo?>"/>
<a href="bar">baz</a>
Just need to see if it works in TM when I get back to my office (and
my Mac!) Definitely bookmarking that site though, and will look more
into this "recording ability."
--
Michael Newton
http://mike.eire.ca/
Although only a TextMate newbie, I would be happy to pay for an
upgrade to version 2.
That said, I can imagine a purchase page that allowed upgraders to
choose from a number of possible "donation" amounts--say, via the sort
of pull-down menu you get when paying for music at http://
Magnatune.com. You could then bury the option to Upgrade for Free
somewhere deep on the page or on another page, so that it's an option
for the needy.
I would also love to contribute a few beers to bundle developers--
perhaps via a similar system or a "checkbox" list.
Thanks to everyone who's contributed to this vibrant community!
jon
/RNN (http://responsenotnecessary.com)
______________________________
Still Water--what networks need to thrive.
http://newmedia.umaine.edu/stillwater/
Sorry, I know this isn't particularly on-topic (aside from the fact
that I'm using Textmate!) but I'm not having luck with the search
engines.
I have a bunch of HTML that needs to be converted to XHTML, notably
<input type="text"> needs to be <input type="text"/> which is easy
enough. Problem is, it's PHP so there are things like <input
type="<?php echo $type?>"> which I'm having troubles with. So how can
I create a regular expression that captures the guts of the HTML
brackets, while ignoring any PHP brackets it might come across inside
the HTML?
Thanks in advance.
Hello,
I had an issue with the Show Outline command from the LaTeX bundle
when using multiple source files spread accross different (relative)
directories.
I took a look at the code and was able to fix it for me by modifying
the line
points += outline_points(filename.adjust_end($1)) if
line.match(INCLUDE_REGEX)
to
points += outline_points(LaTeX.master(filename).adjust_end($1))
if line.match(INCLUDE_REGEX)
Someone with a little more insight might want to check if that is a
good idea and possibly apply it for future versions. :)
Cheers,
Guido
I'm working on adding auto complete to my bundle. I can get the
suggestions to display, but not the tool tip.
The current code section is as follows
completion = {"display" => removed_block,"tool_tip" => "testing this"}
choices.push(completion)
options = {
:extra_chars => '_/' ,
:case_insensitive => false,
:initial_filter => "",
:tool_tip_prefix => 'prefix'
}
TextMate::UI.complete(choices, options)
The choices will display but the tool tip won't.
Timothy
After reading through the comments here:
http://blog.simongregory.com/09/as3-autocompletion-in-textmate/
I have so far failed to get any good looking AS3 autocomplete. What
do I need to do to work out what's going wrong? I am getting this
when I press Alt-Esc:
please select a class to locate the package for
Here's my sample code:
var s:Sprite = new Sprite();
s.(here I press Alt-Esc and get the tooltip)
I can't find the TM log file to look for errors. I have soft linked
my Flex SDK into /Developer/SDKs/flex_sdk_3 as suggested in the
comments on the original thread but I cant make it go. Any suggestions?
Thanks,
Gaby.
--
Sent from my email program on my computer sitting on my desk in my
house.
http://playr.co.uk/
Hey guys,
I wrote a couple snippets for event-based programming in AS3:
-- addEventListener
addEventListener(${1:MouseEvent}.${2:CLICK}, ${3:on${2/(_)?([A-Z])([A-
Z]+)/\u$2\L$3/g}}, ${4:false}, ${5:0}, ${6:true});
-- onEventType
${1:private} function on${2:Click}(event:${3:Event}${4: = null}):
${5:void} {
$0
}
--
I realize that addEventListener is also available in autocomplete.
Here's why you might use it anyway:
- Chording two keys (opt-esc) for a function that is supposed to save
you time (autocomplete) can feel clumsy.
- The tab trigger will autofill a onEventType as a callback for
EVENT_TYPE.
- The above feature works well if you use escape to trigger naive
autocompletion.
Thanks Simon for all your work on the AS3 bundle. Feel free to
include these if you find them worthy. =)
Brenton