VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
13.71k stars 1.31k forks source link

Too many backticks are inserted when using languages with auto-closing backticks #7584

Open fwcd opened 2 years ago

fwcd commented 2 years ago

Describe the bug In languages like JavaScript where VSCode auto-closes backticks, this extension causes the editor to insert too many backticks.

To Reproduce Steps to reproduce the behavior:

  1. Open a JS file
  2. Type 'console.log(`'
  3. Press tab or a character, either way an extra backtick is inserted

Expected behavior Only one closing backtick should be added, like in 'vanilla' VSCode.

Screenshots

https://user-images.githubusercontent.com/30873659/160225503-348e3165-f14e-4ee6-8fd9-2f585a699e8c.mov

Environment (please complete the following information):

noahsalvi commented 2 years ago

Hey i found a temporary solution for this problem.

in settings.json

"vim.insertModeKeyBindings": [
    {
      "before": ["`"],
      "after": ["`", "<Delete>"]
    }
  ]
adamalfredsson commented 11 months ago

Can confirm this is still an issue!

tiredpyrx commented 2 months ago

This is still the case, @noahsalvi's solution is way to go for now, to be honest it is funny too