I'm using TextMate a lot these days to write code for R and I'd like
to see if there's a way to make an improvement.
The existing command in the R bundle works fine as long as I'm
sending just a handful of lines to the R application, but TextMate
gives me the beach ball for as much as a minute when I send lots of
code over, and then suddenly dumps all the code into R. For
reference, here's the short R command:
osascript -e 'tell application "R" to activate' -e "tell application
\"R\" to cmd \"${TM_SELECTED_TEXT//\"/\\\"}\""
I'm guessing that TM itself doesn't have a problem with the amount of
text, and that the bottleneck is in the applescript. Is there any way
to speed up how this is done in the event of a large set of commands?
For example, could the command be split into an array and run line-by-
line? (Would this result in an increase in speed? I have no idea --
just thinking out loud.)
Thanks for suggestions. Cheers-
-Alan
Hi All
Version 1.5.1 (948) has been crashing for the past few days. i'm not
sure if its textmate or OS X as i updated both sometime during the week.
the crash seems to happen when i press "tab" in the find&replace window,
but not all the time.
thanks
/V
Apologies in advance if the answer to my query is blindingly
obvious---I am a UNIX newbie.
I am trying to implement Fletcher Penney's variant of Markdown,
MultiMarkdown (http://fletcher.freeshell.org/wiki/MultiMarkdown), as
a TextMate bundle. The basic idea is to convert a Markdown document
into a full xhtml document and then to use xslt to convert it into
different formats such as LaTeX.
I have written TextMate commands for each step of the process, and it
all works fine, but I would also like to add commands that string
these steps together. But there is a problem. For example, while the
following two TextMate commands work:
Save: Nothing
Command(s): #!/bin/bash
/usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH"
Input: None
Output: Create New Document
Save: Nothing
Command(s): #!/bin/bash
/usr/bin/xsltproc -nonet -novalid /usr/local/bin/xhtml2article.xslt
"$TM_FILEPATH"
Input: None
Output: Create New Document
the following fails---it generates an empty file:
Save: Nothing
Command(s): #!/bin/bash
/usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" | /usr/bin/xsltproc -
nonet -novalid /usr/local/bin/xhtml2article.xslt
Input: None
Output: Create New Document
Any ideas? Thanks in advance.
All the best, Mark
_________________
Mark Eli Kalderon
Department of Philosophy
University College London
Gower Street
London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy
Personal wepage: http://www.kalderon.demon.co.uk
Hi there!,
I have some automatically generated text files with very loooong lines (+4000
characters). When editing those files in TextMate the horizontal scrolling
stops at column 625.
Is this a bug? a feature? a customizable setting?
Thanks!,
/AITOR
No no no no, no background on the tags like that!
(which in "let's not make enemies"-speak translates to, I don't
exactly fancy the new background colour on the html-tags)
Andreas
I thought I'd share this useful transformation. It replaces all - or _
with a space and makes the first character uppercase.
<label for="${1:some_field}"><?php echo _("${3:${1/(^[^-_]+)?([-_]+)?/(?
1:\u$1)(?2: )/g}}"); ?></label>
...would generate something like...
<label for="funky_monkey"><?php echo _("Funky monkey"); ?></label>
Q
Sweet. I couldn't get it to work exactly as described (I had lots of
problems with getting the scope of the caret right), but with some wrangling
- and making sure that certain rules came in the right order - it seems to
be working. I was even able to get "smart deletion" (where backspace deletes
both your smart quotes) with a similar trick.
rock!
> ---------- Forwarded message ----------
> From: Allan Odgaard <throw-away-1(a)macromates.com>
> To: TextMate users <textmate(a)lists.macromates.com>
> Date: Fri, 14 Apr 2006 12:24:15 +0200
> Subject: Re: [TxMt] Bundle for Remind
> On 13/4/2006, at 5:49, Rupa Deadwyler wrote:
>
> > I need to figure out how to scope functions() that have other
> > functions inside them, my first regex was not good at all. And I
> > wish I could get %" to be completed as Smart Typing Pairs, but it
> > seems you can only have one character in them :(
>
> You sort of can. You need to add a rule to the language grammar, e.g.:
>
> { match = '%(\s)';
> captures = {
> 1 = { name = "meta.incomplete-string-or-whatever"; };
> };
> },
>
> Now when you enter % in the source, the scope of the caret should be
> the one shown above. So create a snippet which inserts whatever needs
> insertion ("$1"%) and give that snippet a key equivalent of " and
> scope of source.remind meta.incomplete-string-or-whatever.
>
> Then if you type %" in a source.remind file, you should get %""% with
> the caret in the middle, and you can press tab to skip out of this
> string.
>
> The rule is made so that this only works when the character following
> the % is a whitespace character (which includes newlines, so it also
> works when typing at the end of a line).
>
> As for how to go about this, I attached a bundle with a macro and a
> script, the macro does:
>
> 1) replace all in selection, adding 0xFFFC as the first/last
> character (this is the unicode object replacement character, so I’d
> be surprised if your script already have such characters)
> 2) select all
> 3) call transform.rb with input set to document and output to
> insert as snippet
>
> The transform.rb script then reads stdin, does a split on 0xFFFC
> (resulting in an array with the before/selection/after), snippet-
> escapes each of the 3 parts, and then inserts a snippet which puts
> >>> and <<< around the selection, but leaves those added characters
> unselected, when replacing the document.
Nice!! +2 for Allan :D
> Couldn't you use a macro that selects the entire document and then
> calls a command that has output "insert as snippet" ?
Yeah, but that's a bit too roundabout for my taste ;)
Seriously, I could in theory do this, but to get the same effect I'd
have to copy the text to the clipboard, then select all, then run the
command, and I'd have to change the command to use TM_CLIPBOARD_TEXT
instead of TM_SELECTED_TEXT. I may get around to it at some point,
but unless this feature gets pushed to 2.0, I can wait for a more
elegant solution.
Don't want to sound like a whiner, but that's my excuse FWIW.
- Ben
http://www.unfitforprint.com/articles/2006/04/15/pimping-my-editor-
refactoring-take-1
I'm working on a set of refactoring commands for AS2 using the new
XML input mode. This is the first nugget... hope you enjoy it.
Any chance we'll see "Replace Document with Snippet" anytime soon,
Allan? Best regards,
Ben