Home Download Buy Blog Forum Support

Snippets vs auto-completion?

Snippets vs auto-completion?

Postby trahma on Mon Dec 05, 2011 8:52 pm

I'm a recent TextNate convert and trying to get move my snippets over. The issue I'm having is autocompletion overriding my snippets.

For example the following snippet.

Code: Select all
public function set${1:Variable}(\$${1/./\l$0/})
    \$this->_${1/./\l$0/} = \$${1/./\l$0/};
    return \$this;

At first it's overwritten by setcookie, commenting that out of the PHP.sublime-completions it then completes to setlocale, then setrawcookie, etc. I could comment all of these out but in time I know an update is going to wipe out all of these changes. Whats the best way for me to handle this issue?

Posts: 1
Joined: Mon Dec 05, 2011 8:49 pm

Re: Snippets vs auto-completion?

Postby jasondavis on Thu Dec 15, 2011 9:32 am

Did you try disabling tab completion?

Code: Select all
// When enabled, pressing tab will insert the best matching completion.
// When disabled, tab will only trigger snippets or insert a tab.
// Shift+tab can be used to insert an explicit tab when tab_completion is
// enabled.
"tab_completion": false,

If you put that in the file User\Base File.sublime-settings then when you update Sublimetext2 it will not overwrite your settings as they are in your User file
Posts: 22
Joined: Thu Sep 01, 2011 12:52 am

Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 8 guests