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

Braces inside snippet placeholders don't work correctly #90250

Closed
jedwards1211 opened this issue Feb 7, 2020 · 3 comments
Closed

Braces inside snippet placeholders don't work correctly #90250

jedwards1211 opened this issue Feb 7, 2020 · 3 comments

Comments

@jedwards1211
Copy link
Contributor

  • VSCode Version: 1.40.0
  • OS Version: N/A

Steps to Reproduce:

  1. Create the following snippet:
	"tmp": {
		"prefix": "tmp",
		"body": "${1:{test}}"
	},
  1. Insert the snippet. Cursor position will be before the closing brace:
{test|}
  1. Press backspace. The closing brace will remain:
}

The cursor should start outside the closing brace, and backspace should delete the closing brace as well.

Does this issue occur when all extensions are disabled?: Yes

@vscodebot
Copy link

vscodebot bot commented Feb 7, 2020

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@jedwards1211
Copy link
Contributor Author

Well, dupe of #59292, but the fact that we have to escape the closing brace and not the opening brace is gross

@jedwards1211
Copy link
Contributor Author

jedwards1211 commented Feb 7, 2020

I guess there are cases where it wouldn't be desirable to avoid escaping the closing brace. I wish there were some kind of JS API for defining snippet placeholders and transforms though.

snippet`
this is a ${placeholder(1, '{test}')}
${placeholder(1, text => text.toUpperCase())}
`

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant