Snippets in snippets corner case
Posted: 17.05.2026 00:34
I have just more or less finished setting up the snippets I will need from past experience and begin to actually use them. In doing so I bumped into an issue that is an obvious corner case. Not sure how to resolve this, but I expect it may get annoying in the long run. A solution would be nice.
What happens is that after inserting a snippet it is of course text in the editor. If I now tab through the tab stops and happen to enter a word that resolves to a snippet, that snipped will be expanded in place upon pressing the tab key. Not at all what I wanted. I just wanted to tab to the next tab position. This is of course quite counter productive. The obvious reason is that the tab key does double duty here. It triggers snippet expansion and steps through the list of stops in the inserted text.
Possible solutions:
I might also add, that in my current use case, this is not a situation that happens every once in a blue moon by happenstance. It happens all the time by definition of how that set of snippets works. As there is no way fix this at the moment, I had no choice but to rename the snippets. But frankly the new names don't sit well with me, since I have to remember how I named them. I would rather have names that are obvious.
What happens is that after inserting a snippet it is of course text in the editor. If I now tab through the tab stops and happen to enter a word that resolves to a snippet, that snipped will be expanded in place upon pressing the tab key. Not at all what I wanted. I just wanted to tab to the next tab position. This is of course quite counter productive. The obvious reason is that the tab key does double duty here. It triggers snippet expansion and steps through the list of stops in the inserted text.
Possible solutions:
- suppress snippet expansion while there are still active tab stops
- use a different key either for snippet expansion or stepping through the tab stops
I might also add, that in my current use case, this is not a situation that happens every once in a blue moon by happenstance. It happens all the time by definition of how that set of snippets works. As there is no way fix this at the moment, I had no choice but to rename the snippets. But frankly the new names don't sit well with me, since I have to remember how I named them. I would rather have names that are obvious.