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

Add support for subword navigation/editing #3526

Closed
kumarharsh opened this issue Feb 27, 2016 · 10 comments
Closed

Add support for subword navigation/editing #3526

kumarharsh opened this issue Feb 27, 2016 · 10 comments
Labels
editor-wordnav Editor word navigation issues feature-request Request for new features or functionality
Milestone

Comments

@kumarharsh
Copy link
Contributor

I never encountered this feature outside vim. But then I used Sublime and then Atom, and found this awesome feature, and have been using it a lot recently. Can this be added to vscode?

Ref: atom/atom#5806

@kumarharsh
Copy link
Contributor Author

Seems like #1085 does exactly this. Can we move ahead in polishing that PR so that it can be added to code soon?

@alexdima alexdima added feature-request Request for new features or functionality editor labels Jul 7, 2016
@alexdima alexdima added this to the Backlog milestone Jul 7, 2016
@Krzysztof-Cieslak
Copy link
Contributor

@kumarharsh
Copy link
Contributor Author

It's there, but there are a few things I think it can't do, such as within the filename while renaming/creating new files from the sidebar, or when writing the git commit message, etc.

@astoilkov
Copy link

The first time I encountered this feature was in Atom. I first thought "Hmm. Interesting but it seems like an overhead" but after I experimented with using it it became obvious that it is super useful feature. It would be awesome if it gets implemented.

@alexdima alexdima added editor-commands Editor text manipulation commands and removed editor labels Nov 24, 2017
@V-ed
Copy link
Contributor

V-ed commented Jul 3, 2018

This feature has been added by the PR #48023 and will be available in the 1.25 release of VSCode (proof).

@alexandrudima, This is one of the few duplicates for this feature request that has no recent movement. Shouldn't it be closed as duplicate of the oldest duplicate I can find, a.k.a. #541? Or rather, confirm that the progress is tracked in #46203?

@alexdima
Copy link
Member

alexdima commented Jul 4, 2018

Yes, thanks to @brentwang23 for the PR!

Here is an example for how you can bind the new commands:

{ "key": "ctrl+right",       "command": "cursorWordPartRight",
                                "when": "textInputFocus" },
{ "key": "ctrl+shift+right", "command": "cursorWordPartRightSelect",
                                "when": "textInputFocus" },
{ "key": "ctrl+left",        "command": "cursorWordPartStartLeft",
                                "when": "textInputFocus" },
{ "key": "ctrl+shift+left",  "command": "cursorWordPartStartLeftSelect",
                                "when": "textInputFocus" },
{ "key": "ctrl+backspace",   "command": "deleteWordPartLeft",
                                "when": "textInputFocus && !editorReadonly" },
{ "key": "ctrl+delete",      "command": "deleteWordPartRight",
                                "when": "textInputFocus && !editorReadonly" },

@temurih
Copy link

temurih commented Jul 12, 2018

@alexandrudima, where to add these settings? I tried adding it to USER SETTINGS, but didn't work for me. Wouldn't it be great if there is a button in the release notes that will add the settings where ever they need to go!?

@kumarharsh
Copy link
Contributor Author

The are already there - search for "Keyboard Shortcuts" in Ctrl+P (or press Ctrl+K Ctrl+S)

@temurih
Copy link

temurih commented Jul 12, 2018

@kumarharsh, not on mine!

@kumarharsh
Copy link
Contributor Author

image

Make sure you've upgraded to 1.25.0

@alexdima alexdima added editor-wordnav Editor word navigation issues and removed editor-commands Editor text manipulation commands labels Jul 27, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-wordnav Editor word navigation issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

6 participants