VSCodeVim / VSCodeVim/Vim

surround doesnt work correctly for strings

Open
#9,324 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Describe the bug
I can surround my string from double quotes(") to single quote(') or template strings correctly(`) but if I want to surround a string from everything that it's not a double quotes it simply doesnt work

To Reproduce
Steps to reproduce the behavior:

  1. create a string with single quote
  2. try to use the surround command to change it to double quote

Expected behavior
to change the string from single quote to double quote

Screenshots

Screencast from 2024-10-24 16-42-27.webm

Environment (please complete the following information):

  • Extension (VsCodeVim) version: v1.28.1
  • VSCode version: 1.94.2
  • OS: Ubuntu 24.04

Additional context

  • When the surround command fails, it says in the bottom "The key combination (...) is not a valid command
  • It doesnt work when I try to change an array ([]) to any other thing like a object ({}) or a parentesis ()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the surround command in VSCodeVim with a single-quoted string and with array brackets, then compare the expected conversions with the reported invalid-command message. Trace the surround-command entry point and its handling of quote and delimiter targets; done means these conversions work without the error while existing surround behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.