atom/autocomplete-snippets

Autocompletion when using tab to navigate between placeholders

Closed this issue · 1 comments

Hello,

I'm running into an issue with autocomplete-snippets when I try to navigate between placeholders in a snippets. It is best explained with an example. So, open any .py file so you have access to both ```XXXandlc`` snippets. I assume this should work with other snippets too.

Start by writing lc and expand the snippet:
[value for value in variable]

In this snippet, the first value should be selected. Normally, you fill in the value you want, then you press tab button, and you'll get to the next placeholder and so on.
Say you want to write something like [x for ....
You start writing x, then press tab to move to the next placeholder, and there's the issue: it auto-completes x by expanding it to # XXX: leading to [# XXX: for value in variable].

I didn't manage to get a way to circumvent this behavior (except by canceling the auto-completion of x, but in that case, I also cancel the tab shortcut to the next placeholder...).

The only change I made wrt. to the default settings is to change the default keymap for confirming a suggestion to "tab always, enter when suggestion explicitly selected", but this is not supposed to affect the issue (and I don't want to set it to "enter" only).
I think there's something to do with the "minimum word length" (which is set to 3, meaning that x should not trigger an autocomplete), but the tooltip says "may not affect external provider").

Did I miss something?

After reading some of the open issues, it seems that mine is a duplicate of #75.