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

Selected text is wrapped in quotes when typing quotes #106740

Closed
oliversalzburg opened this issue Sep 15, 2020 · 4 comments
Closed

Selected text is wrapped in quotes when typing quotes #106740

oliversalzburg opened this issue Sep 15, 2020 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded

Comments

@oliversalzburg
Copy link

Issue Type: Bug

I'm pretty sure this isn't a bug, but by-design, but I can't find how to adjust the behavior (assuming you can).

When selecting a word and entering ", the word will be wrapped in quotes, instead of being replaced by a quote.

I searched the settings for "quote" and "wrap" but wasn't able to find a correlating setting.

VS Code version: Code 1.49.0 (e790b93, 2020-09-10T13:22:08.892Z)
OS version: Windows_NT x64 10.0.19041
Remote OS version: Linux x64 4.19.104-microsoft-standard
Remote OS version: Linux x64 4.19.104-microsoft-standard
Remote OS version: Linux x64 4.19.104-microsoft-standard

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz (12 x 3672)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 63.91GB (45.46GB free)
Process Argv --folder-uri=vscode-remote://wsl+Ubuntu/home/oliver/fairmanager/fairmanager/static2 --remote=wsl+Ubuntu --crash-reporter-id f825acfe-92fa-4526-a38a-f8815cf9f7ea
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 4.19.104-microsoft-standard
CPUs Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz (12 x 3672)
Memory (System) 50.14GB (43.78GB free)
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 4.19.104-microsoft-standard
CPUs Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz (12 x 3672)
Memory (System) 50.14GB (43.78GB free)
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 4.19.104-microsoft-standard
CPUs Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz (12 x 3672)
Memory (System) 50.14GB (43.78GB free)
VM 0%
Extensions (28)
Extension Author (truncated) Version
javascript-ejs-support Dig 1.3.1
eslint-disable-snippets drK 1.2.0
output-colorizer IBM 0.1.2
vscode-docker ms- 1.5.0
remote-containers ms- 0.140.1
remote-ssh ms- 0.55.0
remote-ssh-edit ms- 0.55.0
remote-wsl ms- 0.44.5
vscode-remote-extensionpack ms- 0.20.0
vscode-icons vsc 10.2.0
better-toml bun 0.3.2
vscode-eslint dba 2.1.8
eslint-disable-snippets drK 1.2.0
gitlens eam 10.2.2
EditorConfig Edi 0.15.1
prettier-vscode esb 5.6.0
vs-code-xml-format fab 0.1.5
generateuuid Fir 0.0.5
shell-format fox 7.0.1
terraform has 2.2.3
vscode-esformatter how 1.6.0
code-beautifier mic 2.3.3
vscode-docker ms- 1.5.0
js-debug-nightly ms- 2020.9.1417
vscode-paste-image mus 1.0.4
vscode-xml red 0.13.0
vscode-yaml red 0.10.1
lit-plugin run 1.2.1

(2 theme extensions excluded)

@IllusionMH
Copy link
Contributor

This one is controlled by editor.autoSurround but I agree that it's quick to find even if this option is first result when searched by selection.

Probably it make sense to improve description.

Just in case you can do language specific settings like this:

"[json]": {
    "editor.autoSurround": "never"
}

@oliversalzburg
Copy link
Author

Oh, excellent. Thanks for pointing that out.

Not sure if that helps in finding a way to improve the discovery of the setting, but I noticed "quotes" is one of the possible values for editor.autoSurround. Not sure if it would make sense to also crawl the possible values of settings when filtering them down to a search phrase.

I found the editor.autoClosingQuotes through my search. That setting also felt very related to what I was looking for.

It feels a bit inconsistent that there a distinct settings to auto-close quotes/brackets. But for the surround it's a mutually exclusive choice.

@IllusionMH
Copy link
Contributor

IllusionMH commented Sep 15, 2020

But for the surround it's a mutually exclusive choice.

I don't think it is. languageDefined should act mostly as both for languages that support it.

Not sure if it would make sense to also crawl the possible values of settings when filtering them down to a search phrase.

I think it's already filters default values (e.g. languageDefined will return Editor: Auto Closing Brackets, right will return Editor › Minimap: Side), but using all values might make it harder to find relative entries with matches in name/description? but sorting by match priority might help.

@oliversalzburg
Copy link
Author

Alright, before I overcomplicate it too much, maybe a small change in wording is appropriate?

Controls whether the editor should automatically surround selections with quotes or brackets when they are entered.

@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Sep 16, 2020
@alexdima alexdima added this to the September 2020 milestone Sep 16, 2020
@jrieken jrieken added the verified Verification succeeded label Oct 1, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants
@IllusionMH @oliversalzburg @jrieken @alexdima and others