I need some help about code complete in bash and php.
bash -------
VAR_EXAMPLE=1 echo $VAR_EXAMPLE # when I use a variable for the first time, autocomplete won't work when I hit $VAR[ESC]
php ------
class C { private $_a_example = 0; public function foo() { echo $this->_a_example; # when I use a class's property for the first time, autocomplete won't work when I hit $this->_a[ESC] } }
Is there any solution for this or I have to tweak the syntax file?
You can use https://github.com/elia/avian-missing.tmbundle that overwrites the smart completion with Character class indifferent completion (https://github.com/elia/avian-missing.tmbundle#character-class-indifferent-c...)
Elia
— ☁ @elia (http://twitter.com/elia) (twitter) ✎ perlelia@gmail.com (mailto:perlelia@gmail.com) (gtalk) ☎ (+39) 348/9051393 perlelia@gmail.com (mailto:perlelia@gmail.com) (FaceTime) Inviato con Sparrow (http://www.sparrowmailapp.com/?sig)
Il giorno martedì, settembre 11, 2012, alle ore 9:22 am, Yuan Jiang ha scritto:
I need some help about code complete in bash and php. bash
VAR_EXAMPLE=1 echo $VAR_EXAMPLE # when I use a variable for the first time, autocomplete won't work when I hit $VAR[ESC] php
class C { private $_a_example = 0; public function foo() { echo $this->_a_example; # when I use a class's property for the first time, autocomplete won't work when I hit $this->_a[ESC] } } Is there any solution for this or I have to tweak the syntax file? -- Yuan Jiang http://blog.vetcafe.net http://twitter.com/sleetdrop _______________________________________________ textmate mailing list textmate@lists.macromates.com (mailto:textmate@lists.macromates.com) http://lists.macromates.com/listinfo/textmate
Thanks, it works for my php example, but not work for the bash example. Can you give me some guide?
On Tue, Sep 11, 2012 at 4:21 PM, Elia Schito elia@schito.me wrote:
You can use https://github.com/elia/avian-missing.tmbundle that overwrites the smart completion with Character class indifferent completion
Elia
— ☁ @elia (twitter) ✎ perlelia@gmail.com (gtalk) ☎ (+39) 348/9051393 perlelia@gmail.com (FaceTime) Inviato con Sparrow
Il giorno martedì, settembre 11, 2012, alle ore 9:22 am, Yuan Jiang ha scritto:
I need some help about code complete in bash and php.
bash
VAR_EXAMPLE=1 echo $VAR_EXAMPLE # when I use a variable for the first time, autocomplete won't work when I hit $VAR[ESC]
php
class C { private $_a_example = 0; public function foo() { echo $this->_a_example; # when I use a class's property for the first time, autocomplete won't work when I hit $this->_a[ESC] } }
Is there any solution for this or I have to tweak the syntax file?
-- Yuan Jiang http://blog.vetcafe.net http://twitter.com/sleetdrop
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
It should be fixed now :)
Elia
— ☁ @elia (http://twitter.com/elia) (twitter) ✎ perlelia@gmail.com (mailto:perlelia@gmail.com) (gtalk) ☎ (+39) 348/9051393 perlelia@gmail.com (mailto:perlelia@gmail.com) (FaceTime) Inviato con Sparrow (http://www.sparrowmailapp.com/?sig)
Il giorno martedì, settembre 11, 2012, alle ore 6:22 pm, Yuan Jiang ha scritto:
Thanks, it works for my php example, but not work for the bash example. Can you give me some guide? On Tue, Sep 11, 2012 at 4:21 PM, Elia Schito <elia@schito.me (mailto:elia@schito.me)> wrote:
You can use https://github.com/elia/avian-missing.tmbundle that overwrites the smart completion with Character class indifferent completion Elia — ☁ @elia (twitter) ✎ perlelia@gmail.com (mailto:perlelia@gmail.com) (gtalk) ☎ (+39) 348/9051393 perlelia@gmail.com (mailto:perlelia@gmail.com) (FaceTime) Inviato con Sparrow Il giorno martedì, settembre 11, 2012, alle ore 9:22 am, Yuan Jiang ha scritto: I need some help about code complete in bash and php. bash
VAR_EXAMPLE=1 echo $VAR_EXAMPLE # when I use a variable for the first time, autocomplete won't work when I hit $VAR[ESC] php
class C { private $_a_example = 0; public function foo() { echo $this->_a_example; # when I use a class's property for the first time, autocomplete won't work when I hit $this->_a[ESC] } } Is there any solution for this or I have to tweak the syntax file? -- Yuan Jiang http://blog.vetcafe.net http://twitter.com/sleetdrop _______________________________________________ textmate mailing list textmate@lists.macromates.com (mailto:textmate@lists.macromates.com) http://lists.macromates.com/listinfo/textmate _______________________________________________ textmate mailing list textmate@lists.macromates.com (mailto:textmate@lists.macromates.com) http://lists.macromates.com/listinfo/textmate
-- Yuan Jiang http://blog.vetcafe.net http://twitter.com/sleetdrop _______________________________________________ textmate mailing list textmate@lists.macromates.com (mailto:textmate@lists.macromates.com) http://lists.macromates.com/listinfo/textmate
thanks, just tested it. it works now.
On Wed, Sep 12, 2012 at 4:53 AM, Elia Schito elia@schito.me wrote:
It should be fixed now :)
Elia
— ☁ @elia (twitter) ✎ perlelia@gmail.com (gtalk) ☎ (+39) 348/9051393 perlelia@gmail.com (FaceTime) Inviato con Sparrow
Il giorno martedì, settembre 11, 2012, alle ore 6:22 pm, Yuan Jiang ha scritto:
Thanks, it works for my php example, but not work for the bash example. Can you give me some guide?
On Tue, Sep 11, 2012 at 4:21 PM, Elia Schito elia@schito.me wrote:
You can use https://github.com/elia/avian-missing.tmbundle that overwrites the smart completion with Character class indifferent completion
Elia
— ☁ @elia (twitter) ✎ perlelia@gmail.com (gtalk) ☎ (+39) 348/9051393 perlelia@gmail.com (FaceTime) Inviato con Sparrow
Il giorno martedì, settembre 11, 2012, alle ore 9:22 am, Yuan Jiang ha scritto:
I need some help about code complete in bash and php.
bash
VAR_EXAMPLE=1 echo $VAR_EXAMPLE # when I use a variable for the first time, autocomplete won't work when I hit $VAR[ESC]
php
class C { private $_a_example = 0; public function foo() { echo $this->_a_example; # when I use a class's property for the first time, autocomplete won't work when I hit $this->_a[ESC] } }
Is there any solution for this or I have to tweak the syntax file?
-- Yuan Jiang http://blog.vetcafe.net http://twitter.com/sleetdrop
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
-- Yuan Jiang http://blog.vetcafe.net http://twitter.com/sleetdrop
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
The problem with character classes (unless I'm missing something) is that you need to "fix" every grammar to get the same behavior
Elia
— ☁ @elia http://twitter.com/elia (twitter) ✎ elia@schito.me (gtalk) ☎ (+39) 348/9051393 perlelia@gmail.com (FaceTime)
On Wed, Sep 12, 2012 at 5:06 AM, Yuan Jiang sleetdrop@gmail.com wrote:
thanks, just tested it. it works now.
On Wed, Sep 12, 2012 at 4:53 AM, Elia Schito elia@schito.me wrote:
It should be fixed now :)
Elia
— ☁ @elia (twitter) ✎ perlelia@gmail.com (gtalk) ☎ (+39) 348/9051393 perlelia@gmail.com (FaceTime) Inviato con Sparrow
Il giorno martedì, settembre 11, 2012, alle ore 6:22 pm, Yuan Jiang ha scritto:
Thanks, it works for my php example, but not work for the bash example. Can you give me some guide?
On Tue, Sep 11, 2012 at 4:21 PM, Elia Schito elia@schito.me wrote:
You can use https://github.com/elia/avian-missing.tmbundle that
overwrites
the smart completion with Character class indifferent completion
Elia
— ☁ @elia (twitter) ✎ perlelia@gmail.com (gtalk) ☎ (+39) 348/9051393 perlelia@gmail.com (FaceTime) Inviato con Sparrow
Il giorno martedì, settembre 11, 2012, alle ore 9:22 am, Yuan Jiang ha scritto:
I need some help about code complete in bash and php.
bash
VAR_EXAMPLE=1 echo $VAR_EXAMPLE # when I use a variable for the first time, autocomplete won't work when I hit $VAR[ESC]
php
class C { private $_a_example = 0; public function foo() { echo $this->_a_example; # when I use a class's property for the first time, autocomplete won't work when I hit $this->_a[ESC] } }
Is there any solution for this or I have to tweak the syntax file?
-- Yuan Jiang http://blog.vetcafe.net http://twitter.com/sleetdrop
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
-- Yuan Jiang http://blog.vetcafe.net http://twitter.com/sleetdrop
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
-- Yuan Jiang http://blog.vetcafe.net http://twitter.com/sleetdrop
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Sep 12, 2012, at 3:44 PM, Elia Schito elia@schito.me wrote:
The problem with character classes (unless I'm missing something) is that you need to "fix" every grammar to get the same behavior
For ‘$foo’ in PHP and Shell the ‘$’ is scoped as ‘punctuation.definition.variable’. Same for ‘@’ in Ruby for ‘@foo’.
So you can make the (non-word) characters of the variable not part of the unit by making a setting for that scope (or just “punctuation”).
I am not familiar with create such settings, could you give me an example.
On Wed, Sep 12, 2012 at 10:39 PM, Allan Odgaard mailinglist@textmate.org wrote:
On Sep 12, 2012, at 3:44 PM, Elia Schito elia@schito.me wrote:
The problem with character classes (unless I'm missing something) is that you need to "fix" every grammar to get the same behavior
For ‘$foo’ in PHP and Shell the ‘$’ is scoped as ‘punctuation.definition.variable’. Same for ‘@’ in Ruby for ‘@foo’.
So you can make the (non-word) characters of the variable not part of the unit by making a setting for that scope (or just “punctuation”).
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Sep 11, 2012, at 9:22 AM, Yuan Jiang sleetdrop@gmail.com wrote:
I need some help about code complete in bash and php. […] VAR_EXAMPLE=1 echo $VAR_EXAMPLE # when I use a variable for the first time, autocomplete won't work when I hit $VAR[ESC]
It’s explained in this blog post: http://blog.macromates.com/2012/clever-completion/
I know Elia linked to a bundle that redefines the completion command but one can also set characterClass for meta.punctuation. This however will also affect word movement/selection. I’m considering introducing two word definitions (one for completion, another for movement/selection), though even for movement/selection, half the time, the new larger units is not really desired.
Then where could I set characterClass, take the 'php bundle' for example.
On Wed, Sep 12, 2012 at 6:46 AM, Allan Odgaard mailinglist@textmate.org wrote:
On Sep 11, 2012, at 9:22 AM, Yuan Jiang sleetdrop@gmail.com wrote:
I need some help about code complete in bash and php. […] VAR_EXAMPLE=1 echo $VAR_EXAMPLE # when I use a variable for the first time, autocomplete won't work when I hit $VAR[ESC]
It’s explained in this blog post: http://blog.macromates.com/2012/clever-completion/
I know Elia linked to a bundle that redefines the completion command but one can also set characterClass for meta.punctuation. This however will also affect word movement/selection. I’m considering introducing two word definitions (one for completion, another for movement/selection), though even for movement/selection, half the time, the new larger units is not really desired.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate