Not signed in (Sign In)

Categories

Vanilla 1.1.1 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorscriitoru
    • CommentTimeOct 11th 2007
     permalink

    Hello,
    This is my first post on the Intype Forum, and because of this:
    Congratulations to this team. I love it!

    Back to the post, here are five “ideas” on speeding up some PHP coding:

    1.The “variable” snippet: a[TAB]
    2.The “variable equal value” snippet: x[TAB]
    3.The “variable” snippet: a[TAB]
    4.The “define variable” snippet: z[TAB]
    5.The “this variable” snippet. a[TAB][TAB][TAB]

    The zip and details are here. :)

    •  
      CommentAuthordflock
    • CommentTimeOct 12th 2007 edited
     permalink

    Hi scriitoru,
    Thanks for sharing your snippets! I’ve modified them a bit by changing the tab triggers and names to be more natural and uploaded then here

    New triggers:

    1.The “variable” snippet: $[TAB]
    2.The “variable equal value” snippet: $[TAB]
    3.The “define variable” snippet: var[TAB]
    4.The “this variable” snippet. this[TAB][TAB][TAB]

    I’ve also included an info.itInfo file which adds them to the PHP bundles menu – it also changes the existing PHP menu a bit – these new snippets go into ‘Declarations’ and the existing ‘Declarations’ sub-menu is renamed to ‘Flow Control’ which makes more sense.

    The info.itInfo file needs to overwrite the one in your current PHP bundle folder.

  1.  permalink

    Well, there always has been a problem with short tab triggers, especially 1-character triggers. Intype currently does not check the word boundaries, so if you are using tabs to format your code to columns (indentation in the middle of the line), you’ll come to really big problems with launching snippets. The new release will include upgrade of the tab triggering feature, that on Ctrl+Z will replace recently launched snippet with a tab, but still, this is not a solution.

    On the other hand, those snippets are extremely usable. Good work!

  2.  permalink

    I have setup a different snippet, may be handy:

    { title: '$this->' tab_trigger: '$t' scope: 'source.php' content: '\$this->${1:property}${2:($0)}$0' }

    Workflow:

    • $t[TAB]
    • $this->property() (`property` selected) TAB
    • $this->property() (`()` selected) TAB
    • $this->property(|) (caret placed between ()) TAB