Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why having snippets tha explicitly use ${0} in the inside of the inserted text, leaving no way to get out of the snippet? #1462

Open
Aster89 opened this issue Sep 18, 2022 · 0 comments

Comments

@Aster89
Copy link
Contributor

Aster89 commented Sep 18, 2022

I'm specifically referring to HTML snippets, but I guess other language's snippet files are similar.

Take this

snippet b
<b>${0}</b>

If I start this snippet, I have then to go manually normal mode to get out of the tag. Luckily, UltiSnips' snippet take precendence, and it uses the tabstop number 1 instead of 0, which gets defaulted to after-the-snippet:

snippet b "<b>" w
<b>$1</b>
endsnippet

Unfortunately, not all snippets are like that. The snippet for <p>, for instance, uses the 0th tabstop in both collections:

snippet p
<p>${0}</p>

snippet p "paragraph" w
<p>${0:${VISUAL}}</p>
endsnippet

Is it ok if I make a PR for snippets/html.snippets and UltiSnips/html.snippets change all those 0s to 1s?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant