2

When I type else and hit Tab, Sublime inserts printer_draw_elipse(printer_handle, ul_x, ul_y, lr_x, lr_y). How do I avoid this, and make it only insert the Tab character?

I noticed the file with the path ~/.config/sublime-text-2/Packages/PHP/php-else.sublime-snippet, but removing that had no effect.

2
  • Did you restart sublime text after removing the snippet file? Commented Apr 17, 2014 at 14:42
  • I hadn't done that, but I just tried and it didn't do the trick. Commented Apr 17, 2014 at 15:14

1 Answer 1

2

This is the unfortunate result of partial-text matching and autocomplete. The way I've gotten past it is to add the following line to the end of the completions list in ~/.config/sublime-text-2/Packages/PHP/PHP.sublime-completions (after the zlib_get_coding_type trigger, though you can place it anywhere in that list of triggers and it will work):

{ "trigger": "else", "contents": "else  " }

Essentially, we're short-circuiting the autocomplete with our own snippet that just replaces the "else"+TAB sequence with "else" and a trailing tab.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.