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

Shortcut ctrl+del doesn't delete trailing space #34456

Closed
grokky1 opened this issue Sep 15, 2017 · 2 comments
Closed

Shortcut ctrl+del doesn't delete trailing space #34456

grokky1 opened this issue Sep 15, 2017 · 2 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@grokky1
Copy link

grokky1 commented Sep 15, 2017

  • VSCode Version: 1.16.0
  • OS Version: Win10 x64
  1. I want to edit "foo bar baz" to "foo baz"
  2. In most editors, and in Visual Studio too, I would position cursor before "bar", and press ctrl+del, which would delete "bar" as well as the space after it.
  3. But in VSCode it deletes "bar" only, and leaves the space, which I must then delete as well.

Very frustrating as it's not the same as in VS or the 99% of IDEs and editors out there. Even here in GitHub it works that way, try it for yourself.

@alexdima
Copy link
Member

Please see #832 (comment)

To get VS-style Ctrl+Delete, edit your keybindings.json and add:

{ "key":"ctrl+delete",       "command":"deleteWordStartRight",       "when":"editorTextFocus" }

This will overwrite the default:

{ "key":"ctrl+delete",       "command":"deleteWordRight",            "when":"editorTextFocus" }

@alexdima alexdima added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Sep 15, 2017
@alexdima alexdima self-assigned this Sep 15, 2017
@grokky1
Copy link
Author

grokky1 commented Sep 15, 2017

👍

@grokky1 grokky1 closed this as completed Sep 15, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants