question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

snippets placeholder transform not working

See original GitHub issue

Describe the bug snippets placeholder transform not working

To Reproduce

"HelloWorld": {
	"prefix": "test",
	"body": "${1} ${2} -> ${1/Hello/Hallo/} ${2/World/Welt/}"
}

type Hello World -> Hello World

Expected behavior Hello World -> Hallo Welt

it’s work after disable vim plugin!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:40
  • Comments:24 (4 by maintainers)

github_iconTop GitHub Comments

16reactions
lunawarriorcommented, Aug 16, 2019

I found a workaround that makes it much less annoying: In the keybindings for the command “extension.vim_backspace” add to the When clause “!editorHasSelection”.

This allows you to press backspace and delete the things that are automatically highlighted during the snippet process.

The only downside is if you had anything hooked up to backspace in Visual Mode it will no longer work.

4reactions
MaciekBaroncommented, Oct 27, 2020

Issue still seems to be happening, vim enters visual mode and you can’t use the snippet properly

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code Snippet | Placeholder + Transform - Stack Overflow
Just to save some frustration, placeholder transforms do not work on default or choice syntaxes. As in: "${1:foo/(.
Read more >
Snippets in Visual Studio Code
When a variable is unknown (that is, its name isn't defined) the name of the variable is inserted and it is transformed into...
Read more >
Dynamic Placeholders - Alfred Help and Support
Alfred offers dynamic placeholders, which allow you to insert dynamically-created content when using Snippets and in certain workflow objects.
Read more >
Transforming VS Code Snippets - DEV Community ‍ ‍
Transformations in our snippets take either a variable or placeholder and modify it in some way. Why would we do this? Let's look...
Read more >
Writing snippets
Plain Text · Embedded Emacs-lisp code. Note: backquote expressions should not modify the buffer · Tab stop fields · Placeholder fields · Mirrors...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found