Hello,
just try to re-indent the following snippet with textmate and wonder
about it. ;)
Is there a way to fix the indentation? In which bundle should it be
fixed? HTML oder PHP?
<html>
<header>
<body>
<?php
$array['foo'] = array(
'foo' => 'bar',
'bar' => 'foo' );
$array['bar'] = array(
'foo' => 'bar',
'bar' => 'foo'
);
?>
<?php if (test == "") { ?>
<ul>
<li>foo</li>
<li>bar</li>
…
[View More] </ul>
<?php } else { ?>
<ul>
<li>bar</li>
<li>foo</li>
</ul>
<?php } ?>
</body>
</header>
</html>
Regards, Wolfgang
[View Less]
> My first intention, just to see how things are working i wanted to
> make a trace output - which says "Hello World". What am i doing
> wrong? Ive tried to use the ActionScript template and i did a
> script which just says trace ("Hello World"); I did use the
> "Install MTASC Support Files" and i did a try without...nothing
> happens. Can anybody help or does know where i get some
> information? ==================================
trace() is used by the Flash …
[View More]IDE. The MTASC equivalent is TRACE(),
which you can set up on the command line to point to another
function. I'm currently using the LuminicBox logger, but everyone has
their favorite. Google 'actionscript logger' for more options. Most
of them either work over a LocalConnection or an XMLSocket to pass
information to the logger. XMLSocket loggers are faster but the ones
I've seen are less robusty (Luminic, which is a LC debugger, has a
nice tree view for your objects).
Good luck :)
P.S. If you're interested in a more complete workflow, check out my
howto on the subject at
http://www.unfitforprint.com/articles/2006/01/02/howto-develop-flash-
on-mac-osx-with-rake-mtasc-swfmill-and-textmate
___________________
Ben Jackson
Diretor de Desenvolvimento
+55 (21) 2256-1022
ben(a)incomumdesign.com
http://www.incomumdesign.com
[View Less]
Hi,
I look at 'Insert Command Template' and this one of my favorites ;)
Nevertheless I have some humble suggestions to improve it:
1)
Now this command executes the apropos function within a new fresh R
session. This means that it doesn't know which libraries I'm
currently using and it doesn't know which functions I defined within
my R session. To use 'Insert Command Template' also for this you
should load the function 'getSig.r' in my current session (renamed in
'.getSig' ) and …
[View More]executes this within my session to get these
signatures too.
By doing so you would increase the speed of it enormously and you can
insert signatures for user-defined functions and functions coming
from loaded libraries.
The disadvantage of it would be that you have such queries in your
current session; ok you don't see them in the TM R console window,
but if you save it workspace you would have these.
To avoid this you could think about to write the answer of the query
into a file and load it in TM.
Or, if you don't interested in the user-defined functions you could
start a new R session which loads all libraries which are loaded in
my current session.
(I don't know whether this would also work for user-defined fucntions?)
2)
If you use the approach in 1) then you can do more elaborated things
with it because of the speed.
Examples:
-If I look for for a keyword it will insert the signature like the
old version. If there is nothing found it will look for functions
which begins with the keyword like the old version.
-If I type e.g. 'data.' it lists all methods for 'data.' like
data.class, data.frame etc. but not 'dataentry'
-If I type e.g. '.difftime' you get all functions where '.difftime'
is specified like mean.difftime, print.difftime. To insert the
signature you have to select the keyword in beforehand otherwise it
shows a tooltip.
-If I have no idea about the complete name of a function you can type
e.g. '.load.'. This would look for '*load*' as regexp. Furthermore
sometimes I cannot remember whether the a function is called
'shownames' or 'showNames', so you can write '.names.' and it looks
for '*names*|*Names*'.
I would use periods for '.foo.' for indicating this because it will
be caught be Ruby's getword function.
Of course you can do more things:
-You could catch the 'apropos()' function and run it in TM and print
the result as pop down menu
and and and
What do you think about it?
To change to code would be relatively easy.
Best,
-Hans
[View Less]
Hi,
Regarding to the R-bundle command 'Command Usage':
I find this idea very good, but it supposes that on every Mac
'texscan' is installed.
So here's my suggestion for it:
1)
I don't use Ruby, only Bash with a tiny Perl snippet. It is a bit
faster.
2)
I'm looking for HTML files, not for tex files.
3)
It could happen that the structure of a help file is inconsistent,
i.e. no 'Usage' header. If so, now it outputs the first 1100
character of the help as plain text. Maybe you find …
[View More]what do you are
looking for.
4)
I suppressed the error messages coming from the 'find' command
mentioning that there is no permission to do something.
Here the code:
________________
COM=`tail`
FILES=`find "${R_HOME:-/Library/Frameworks/R.framework/Resources}"/
library -name $COM.html -print 2>/dev/null`
if [ ${#FILES} -eq 0 ]; then
echo "Nothing found for '$COM'"
exit_show_tool_tip
fi
for F in $FILES
do
cat "$F" | perl -e '$a="";while(<>){$a.=$_};$a=~m/<h3>Usage<\/h3\>[.|
\n]+<pre>(.*?)<\/pre>/sim;if($1){print "Usage:\n".$1;}else{$a=~s/<.*?
>//gms;$a=~s/\n{3,}/\n\n/gms;print substr($a,0,1100)."\n[...]"}'
done
__________________
Any comments?
Best,
-Hans
[View Less]
Hi,
I just found a very tiny bug within the R function getSig.r of that
bundle.
If you type 'plot.lm' and invoke that command to get the template it
gives you a weird output because within the formals you find an item
'caption', and within this item there is a '\n'. The ruby pop down
menu, of course, interprets a '\n' as a new line.
To avoid this I would include within the getSig.r at line 12 this:
10: if (is.symbol(f[[arg]]) && f[[arg]] == "") arg else list(arg, f
[[arg]])
…
[View More]11: ),
12: function (arg, escape=function(x) ifelse(snippet, {gsub("([\\
$`}])", "\\\\\\1", x);gsub("\n", "", x)}, x))
13: if (is.list(arg))
i.e. I add a gsub in the 'escape' function to delete each '\n'
I don't know whether this will be good. The case is very rarely.
Comments?
Best,
-Hans
[View Less]
HI,
sorry for the, maybe stupid, question, but I didn't find something in
the internet.
How can I make a copy of an existing bundle? To duplicate commands or
snippets, that's simple, but for an entire bundle?
If I simply create a new folder.tmbundle and copy&paste things in it,
then I also have duplicated uuid's.
Thanks in advance
-Hans
Hi there
I am very new to programming and ive used to make programm in Flash.
Its just a little project and i do programming in my freetime as a
hobby.
My 30 days of using Flash for free are over (since a half year now ;)
and i wanted to re-wake this project and do it without Flash using
TextMate and the ActionScript Bundle.
I had a look at the Bundle Developer Site and followed the
instructions mentioned there. But i still have absolutely NO CLUE
what to do.
My first intention, …
[View More]just to see how things are working i wanted to
make a trace output - which says "Hello World".
What am i doing wrong? Ive tried to use the ActionScript template and
i did a script which just says
trace ("Hello World");
I did use the "Install MTASC Support Files" and i did a try
without...nothing happens.
Can anybody help or does know where i get some information?
Thanks for your help
==================================
Zettt
azeitler(a)zettt.de
==================================
[View Less]
I've been trying to set the foldingStartMarker and foldingStopMarker
for a simplified variant of Markdown but have had no success. The
file would look something like this
# First heading #
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse
vel nunc.
Suspendisse egestas erat vitae pede. Phasellus quis libero et tortor
commodo
auctor. Sed et erat. Aliquam sed lectus. Fusce semper elit nec ipsum.
Morbi
sem nisl, tristique id, venenatis quis, gravida sed, neque. Etiam …
[View More]ut
felis. Curabitur leo magna, molestie vitae, blandit et, fringilla
vitae, purus.
# Second heading #
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse
vel nunc.
Suspendisse egestas erat vitae pede. Phasellus quis libero et tortor
commodo
auctor. Sed et erat.
Aliquam sed lectus. Fusce semper elit nec ipsum. Morbi
sem nisl, tristique id, venenatis quis, gravida sed, neque. Etiam ut
felis. Curabitur leo magna, molestie vitae, blandit et, fringilla
vitae, purus.
# Third heading #
etc
I'd like to fold so that only the heading lines show.
The foldingStartMarker is easy:
foldingStartMarker = '^# +';
But I can't get a foldingStopMarker that works. What I'd like to use
is a blank line followed by a positive lookahead to a line that
starts with a hash and a space, but
foldingStopMarker = '^$\n(?=^# +)';
doesn't work, even though that regex works in the Find dialog box.
Are the start and stop markers restricted to single line patterns?
The manual suggests that, but it isn't explicit. Does anyone have any
ideas?
--
Dr. Drang
[View Less]
Not a lot of explanation needed. These are all XHTML compliant, some
include self closing tags and do not offer the option to avoid this,
so some work may be necessary. In fact, there will probably be a lot
of disagreement over how to handle a few things, and my feelings
won't be hurt. Take this as a suggestion, and perhaps overkill. I
actually prefer to just use the generic "insert open/close tag" these
days, but agree that there are times that typing a tag and hitting
tab …
[View More]would be convenient.
Brett
[View Less]