Sublime Forum

Insert a tab ignoring all completions and snippets

#1

Is there any way to just insert a tab?

Currently whenever I’m in a docblock in PHP I try to tab after the word array and it keeps trying to insert completions or snippets.

tab_completion is set to false and I deleted the array snippet in the PHP package, but when I go to tab it says inserting best completion in the status bar and tacks on a pair of parenthesis instead of a tab. I tried just binding tab to insert a tab but this was just a mess.

This is incredibly frustrating.

0 Likes

#2

It’ll be PHP.sublime-completions triggering the behavior in this instance - this is a bug, it shouldn’t be happening when tab completion is turned off.

I’m planning to make some changes to the completion logic that will help this, work arounds for the moment are to change the key bindings (getting rid of all the insert_best_completion related bindings), or, if you’re on OSX, use Option+Tab to insert a tab. There aren’t any free modifier+tab combinations available on windows/linux, unfortunately.

0 Likes

#3

Ah alright, thanks.

I tried commenting out these 2 binds:

[code]{ “keys”: “tab”], “command”: “insert_best_completion”, “args”: {“default”: “\t”, “exact”: true} },
{ “keys”: “tab”], “command”: “insert_best_completion”, “args”: {“default”: “\t”, “exact”: false},
“context”:

	{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]

},[/code]
and tab just does nothing.

0 Likes

#4

You’ll need to add another key binding that explicitly inserts a tab, along the lines of what the “enter” key is bound to

0 Likes

#5

Bleh my bad, that’s was stupid on my part. It was late and I was trying to finish something up before taking off and it was just aggravating the hell out of me.

0 Likes