Sublime Forum

After inserting a snippet tab doesn't move to next field-ST2

#1

Hello, I have this issue for a while now. Whenever I use a snippet, the first field gets highlighted and after typing something I’d expect that hitting tab will move me to the next field.
In my case it just inserts a tab character (tab acts like a tab - outrageous!). I have tried messing around with every configuration that seemed to be tab related to no avail, so I suspect it might be some combination of settings.

Any ideas?

0 Likes

#2

?

0 Likes

#3

Any help whatsoever?

0 Likes

#4

:smile:

0 Likes

#5

Is it a specific snippet or all snippets? If it’s a specific one, can you post the snippet?

0 Likes

#7

If you open the sublime python console and run sublime.log_commands(True) it will show the commands that are being triggered as you use Sublime. You can use this to see what happens when you attempt to tab to the next field in a snippet. In my case it ended up being caused by a plugin I was using for indentation (Indent Size). Upon removing that I was able to tab between fields within snippets.

0 Likes

#8

Thanks for the tip! Using it I figured out the problematic setting was:

{ “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 }
]
},

Commenting it out enabled me to skip snippet fields with the tab key. Haven’t noticed any other changes in behavior.
Thank you:)

0 Likes