Hello everyone,
if I insert a snippet with a tabstop, which is immediately followed by a number (without any white spaces in between), the number gets interpreted as belonging to the tabstop. Is there a way to aviod this?
I want to put the caret to an arbitrary location of a (script generated) replaced text, which might be inside a number block. The solution I have is to put a pair of backticks before the number, but then the inserted text flashes on insertion, so it does not seem to be the correct way to solve this.
Best, Christoph
On 24.09.2008, at 09:56, Christoph Wockel wrote:
Hello everyone,
if I insert a snippet with a tabstop, which is immediately followed by a number (without any white spaces in between), the number gets interpreted as belonging to the tabstop. Is there a way to aviod this?
I want to put the caret to an arbitrary location of a (script generated) replaced text, which might be inside a number block. The solution I have is to put a pair of backticks before the number, but then the inserted text flashes on insertion, so it does not seem to be the correct way to solve this.
Could you please post an example?
--Hans
sure, I want to insert
$00
where the second 0 should be inserted as text. The wouraround would be $0``0. Unfortunately, I was not able to create an easy where the text flashes on insertion, this only occurs when I use the following Perl script, which I use to move the caret forward on hitting return inside LaTeX inline equations (see the screenshot for the whole bundle editor entry).
#!/usr/bin/env perl $_=<STDIN>; $_=~/^(.{$ENV{'TM_LINE_INDEX'}}(?:\?[a-zA-Z]+|.)?)(.*)$/; $tmp1=$1; $tmp2=$2; $tmp1=~s/(\|$|`)/\$1/g; $tmp2=~s/(\|$|`)/\$1/g; if($tmp2=~/^[0-9]/){$tmp2 = "``".$tmp2} print $tmp1."$"."0".$tmp2;
On 24.09.2008, at 10:12, Hans-Jörg Bibiko wrote:
On 24.09.2008, at 09:56, Christoph Wockel wrote:
Hello everyone,
if I insert a snippet with a tabstop, which is immediately followed by a number (without any white spaces in between), the number gets interpreted as belonging to the tabstop. Is there a way to aviod this?
I want to put the caret to an arbitrary location of a (script generated) replaced text, which might be inside a number block. The solution I have is to put a pair of backticks before the number, but then the inserted text flashes on insertion, so it does not seem to be the correct way to solve this.
Could you please post an example?
--Hans
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
yes, thanks!
Christoph
On 24.09.2008, at 11:08, Alex Ross wrote:
On Sep 24, 2008, at 10:41 AM, Christoph Wockel wrote:
sure, I want to insert
$00
You want:
${0}0
—Alex
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 24.09.2008, at 10:41, Christoph Wockel wrote:
$00
where the second 0 should be inserted as text. The wouraround would be $0``0. Unfortunately, I was not able to create an easy where the text flashes on insertion, this only occurs when I use the following Perl script, which I use to move the caret forward on hitting return inside LaTeX inline equations (see the screenshot for the whole bundle editor entry).
I do not know if I understood you correctly, but try this one:
#!/usr/bin/env perl <STDIN>=~/^(.{$ENV{'TM_LINE_INDEX'}}(?:\?[a-zA-Z]+|.)?)(.*)$/; $tmp1=$1; $tmp2=$2; $tmp1=~s/(\|$|`)/\$1/g; $tmp2=~s/(\|$|`)/\$1/g; print "$tmp1${0:}$tmp2";
To insert a snippet tabstop one normally uses ${x:} ; x := number
--Hans