Doug Schepers | 1 Mar 09:32 2010

Incremental Sequences for Replacement

Hi, Allan-

Following up from IRC...

My text editor of choice on Windows was TextPad, and it supported a 
handy way to insert sequential numbers for "replace all" operations. 
This was useful, for example, when inserting line numbers, creating 
unique ids, etc.

I don't know if the syntax was unique to TextPad, or if it is part of 
some standard regex syntax, but it was pretty simple and effective:

\i(<start_index>,<increment>)

\i Replace with numbers starting from 1, incrementing by 1.
\i(10) Replace with numbers starting from 10, incrementing by 1.
\i(0,10) Replace with numbers starting from 0, incrementing by 10.
\i(100,-10) Replace with numbers starting from 100, decrementing by -10.

Any chance this (or something similar) could be added to TextMate?

Thanks-
-Doug

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

(Continue reading)

Hans-Jörg Bibiko | 1 Mar 10:10 2010
Picon

Re: Incremental Sequences for Replacement


On Mar 1, 2010, at 9:32 AM, Doug Schepers wrote:

> My text editor of choice on Windows was TextPad, and it supported a handy way to insert sequential numbers
for "replace all" operations. This was useful, for example, when inserting line numbers, creating
unique ids, etc.
> 
> I don't know if the syntax was unique to TextPad, or if it is part of some standard regex syntax, but it was
pretty simple and effective:
> 
> \i(<start_index>,<increment>)
> 
> \i Replace with numbers starting from 1, incrementing by 1.
> \i(10) Replace with numbers starting from 10, incrementing by 1.
> \i(0,10) Replace with numbers starting from 0, incrementing by 10.
> \i(100,-10) Replace with numbers starting from 100, decrementing by -10.
> 
> Any chance this (or something similar) could be added to TextMate?

Hi Doug,

for such cases I use this tmcommand:
Input: selection or document
Ouptut: new doc
Command:
#!/usr/bin/perl -w
#!/usr/bin/perl -w

$cnt=1;
$inc=1;
(Continue reading)

Mario Ricalde | 1 Mar 14:29 2010

PHP Smart Code Completion (a.k.a Intellisense)

I've been working on a PHP Smart Autocompletion / Intellisense for Textmate and I though I would ask a couple
of questions to any PHP Developer interested on the idea:

1. Would you like smart code completion to work only on the included files or in the current project?
2. What Frameworks for PHP do you use with textmate?
3. Do you mind if the bundle creates an extra hidden folder to cache the parsed code?
4. How frequently do you use Namespaces? ( PHP 5.3 )

When I say Smart Autocompletion, I mean it'll know your classes inheritance, how you call them, the scope, etc.

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Gaby Vanhegan | 1 Mar 14:33 2010
Picon

Re: PHP Smart Code Completion (a.k.a Intellisense)


On 1 Mar 2010, at 13:29, Mario Ricalde wrote:

> I've been working on a PHP Smart Autocompletion / Intellisense for Textmate and I though I would ask a
couple of questions to any PHP Developer interested on the idea:
> 
> 1. Would you like smart code completion to work only on the included files or in the current project?

Whole project.  FlashDevelop have got this kind of thing right, if you could use that as a model then you'd
have an amazing plugin.

> 2. What Frameworks for PHP do you use with textmate?

If you can get point 1 right then this doesn't matter.

> 3. Do you mind if the bundle creates an extra hidden folder to cache the parsed code?

For me, no.  Provided there was an option to clear that cache somehow.

> When I say Smart Autocompletion, I mean it'll know your classes inheritance, how you call them, the scope, etc.

FlashDevelop goes even further with this, parsing JavaDoc style comments and using them as tooltips in the
autocomplete.  Very handy.

--
Sent from my email program on my computer sitting on my desk in my house.
http://playr.co.uk/

_______________________________________________
textmate mailing list
(Continue reading)

Karol Podkowski | 1 Mar 14:43 2010

Re: PHP Smart Code Completion (a.k.a Intellisense)

I totally agree with Gaby. The same thing is with Flash Builder.
If you could get this kind of behavior it would be my YES for still working TextMate - I'm currently checking other editors for code completion.

Btw. how advanced the progress is? :) When can we expect some preview? :) Or you gonna make it TM2 like - just rumors :)
Still TM is my favorite editor and I don't want to switch to other ... :)

On Mon, Mar 1, 2010 at 2:33 PM, Gaby Vanhegan <gaby-2nrJod1Wo2Hk1uMJSBkQmQ@public.gmane.org> wrote:

On 1 Mar 2010, at 13:29, Mario Ricalde wrote:

> I've been working on a PHP Smart Autocompletion / Intellisense for Textmate and I though I would ask a couple of questions to any PHP Developer interested on the idea:
>
> 1. Would you like smart code completion to work only on the included files or in the current project?

Whole project.  FlashDevelop have got this kind of thing right, if you could use that as a model then you'd have an amazing plugin.

> 2. What Frameworks for PHP do you use with textmate?

If you can get point 1 right then this doesn't matter.

> 3. Do you mind if the bundle creates an extra hidden folder to cache the parsed code?

For me, no.  Provided there was an option to clear that cache somehow.

> When I say Smart Autocompletion, I mean it'll know your classes inheritance, how you call them, the scope, etc.

FlashDevelop goes even further with this, parsing JavaDoc style comments and using them as tooltips in the autocomplete.  Very handy.

--
Sent from my email program on my computer sitting on my desk in my house.
http://playr.co.uk/


_______________________________________________
textmate mailing list
textmate-qhrM8SXbD5LrQoZeqNtYVeG/Ez6ZCGd0@public.gmane.orgcom
http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate
Simon Gregory | 1 Mar 21:51 2010

Re: PHP Smart Code Completion (a.k.a Intellisense)

> 3. Do you mind if the bundle creates an extra hidden folder to cache the parsed code?

When I put together the auto completion for ActionScript 3 I found that ruby chewed through the classes fast
enough not to worry about caching.

Cheers,
Simon

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Doug Schepers | 1 Mar 22:41 2010

Re: Incremental Sequences for Replacement

Hi, Hans-

Thanks for the reply.

Hans-Jörg Bibiko wrote (on 3/1/10 4:10 AM):
>
> for such cases I use this tmcommand:
> Input: selection or document
> Ouptut: new doc
> Command:
> #!/usr/bin/perl -w
> #!/usr/bin/perl -w
>
> $cnt=1;
> $inc=1;
>
> while(<>) {
> 	if(m/^\\i\((\d+)\s*,\s*(\d+)\)$/) {
> 		$cnt=$1;
> 		$inc=$2;
> 		next;
> 	}
> 	while(s/\\i/$cnt/) {$cnt+=$inc;}
> 	print;
> }
> Example text:
> Hello, this is a test.
> \i(2,5)
> Here my \i. item followed by item \i.
> Furthermore here is my \i. item.
>
>
> Then you get:
> Hello, this is a test.
> Here my 2. item followed by item 7.
> Furthermore here is my 12. item.
>
>
> If you do not set up \i(a,b) it simply starts at 1 incremented by 1.

I've been using TextMate for a while, but I haven't had the time to dig 
into its more powerful features.  I was able to create the command, but 
I don't quite understand the usage.

Here's an example use case: I have a document, and I want to write out a 
regex that matches on a certain pattern (Find: (<a) (class="([^"]*)") ) 
and add an id to each matching instance (Replace: $1 id="_\i(2,5)" $2 ), 
with changes applied inline into the current document.  With a command, 
how to I supply the pattern to match?  Is this possible?

Regards-
-Doug

_______________________________________________
textmate mailing list
textmate <at> lists.macromates.com
http://lists.macromates.com/listinfo/textmate
Artie Ziff | 2 Mar 02:08 2010
Picon

file dialog defaults to root of local volume

Hello,

Has anyone else noticed a change in Textmate's behavior wherein the file
dialog defaults to the root of the local volume, as opposed to the most
recently used directory?

AFAIK, Textmate did not behave like this in the past. I am using build
1589. I notice that this behavior is only on my Snow Leopard (10.6) and
not another Mac running 10.5. Any ideas out there?

Cheers,
AZ

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Chris Rebert | 2 Mar 07:02 2010

Re: file dialog defaults to root of local volume

On Mon, Mar 1, 2010 at 5:08 PM, Artie Ziff <artie.ziff@...> wrote:
> Hello,
>
> Has anyone else noticed a change in Textmate's behavior wherein the file
> dialog defaults to the root of the local volume, as opposed to the most
> recently used directory?
>
> AFAIK, Textmate did not behave like this in the past. I am using build
> 1589. I notice that this behavior is only on my Snow Leopard (10.6) and
> not another Mac running 10.5. Any ideas out there?

It's a known issue:
http://lists.macromates.com/textmate/2009-October/029776.html

Cheers,
Chris
--
http://blog.rebertia.com

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Mario Ricalde | 2 Mar 16:18 2010

Re: PHP Smart Code Completion (a.k.a Intellisense)

Gaby Vanhegan:

I've been working on a PHP Smart Autocompletion / Intellisense for Textmate and I though I would ask a couple of questions to any PHP Developer interested on the idea:

1. Would you like smart code completion to work only on the included files or in the current project?

Whole project.  FlashDevelop have got this kind of thing right, if you could use that as a model then you'd have an amazing plugin.

2. What Frameworks for PHP do you use with textmate?

If you can get point 1 right then this doesn't matter.

3. Do you mind if the bundle creates an extra hidden folder to cache the parsed code?

For me, no.  Provided there was an option to clear that cache somehow.

When I say Smart Autocompletion, I mean it'll know your classes inheritance, how you call them, the scope, etc.

FlashDevelop goes even further with this, parsing JavaDoc style comments and using them as tooltips in the autocomplete. Very handy.

Gaby, I already got it right. Parsing all the competent files on the project and parsing them accordingly; good to know I'm on the good path.

It's good to know what Frameworks you work on, yes it does matter. Mostly  because most of them use different naming conventions adding prefixes to the "real classes" and removing them from the loading process. ( for example, new MyClass will load MyFrameWork_MyClass ).

The PHP Smart Autocompletion is prepared to work with the tooltips with documentation; however, the Textmate provided DIALOG is not good enough to handle this kind of stuff; I'll be adding it later when Joachim finishes his mod.

On Mon, Mar 1, 2010 at 2:33 PM, Gaby Vanhegan wrote:

I totally agree with Gaby. The same thing is with Flash Builder.
If you could get this kind of behavior it would be my YES for still working
TextMate - I'm currently checking other editors for code completion.

Btw. how advanced the progress is? :) When can we expect some preview? :) Or
you gonna make it TM2 like - just rumors :)
Still TM is my favorite editor and I don't want to switch to other ... :)

As I already stated, the behavior can be achieved; it's just a matter of time before Joachim updates his mod for dialog. Also, it's good to know that this bundle will actually make some PHP Developers use TextMate more :)

About how advanced the bundlee is:
I already had a pre-beta, which was a complete mess and was my first try. Doing it wrong with Regular Expressions. It worked, but not with as smart as I wanted it to be. About the current version, here's what I have and what I need to do:

  • PHP Parser, 90% done.
    It's almost perfect, I just need to make a little tweaking. For instance, I'm thinking about storing definition of class-level variables within a class method. Even if they were not defined during the definition of the class via "public/private/protected/static $var".
  • Project Files, 100% done.
  • Caching Process, 95% done.
    Need some tweaking on this. Will leave it for the after-release.
  • Current Scope Identification 10%
    I need to work more on this, because of the way TextMate handles "words", $this->sad are 3 words, which means I'll need to parse the current line for autocompletion, resolve the variables and scope and then perform the project parsing.
  • Building of the AutoCompletion 80%
    After resolving the relationship, scope, visibility, etc. The building will come in. I already have this done because of the pre-beta.

About the release date; I'm not sure. I'm working on it on my free time and today is my birthday; so I won't have a lot of time for me to work with it today. I'll try to keep you posted. If you can please give me any ideas to add it would be great, because this is the best stage for doing that.



_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Gmane