kasecato / vscode-intellij-idea-keybindings

Port of IntelliJ IDEA key bindings for VS Code.
https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings
MIT License
813 stars 135 forks source link

Add support for camel humps #300

Closed a-stewart closed 3 months ago

a-stewart commented 1 year ago

In IntelliJ, you can enable "CamelHumps" mode making it so various text editing operations have units by CamelHumps.

image

For example, pressing "CTRL+DEL" when your cursor is at the end of "ActionResourcePath" would change it into "ActionResource" and if you did it again then "Action".

For example, pressing "CTRL+Arrow key" when your cursor is at the end of "ActionResourcePath" would put your cursor between "Resource" and "Path"


VS Code added support for subword navigation in 1.25:
https://code.visualstudio.com/updates/v1_25#_subword-support

I wonder if we could create a setting for the IntelliJ keybindings extension and when use the when clause in keybindings to perform different commands based on that?

kasecato commented 11 months ago

I released it on v1.5.10 now. Please check it

mammuth commented 6 months ago

I just used the plugin (v1.5.12) and for me, the camel hump settings seem to get imported incorrectly.

It generated:

    {
        "command": "cursorWordRight",
        "key": "alt+[ArrowRight]",
        "when": "textInputFocus"
    },
    {
        "command": "cursorWordRightSelect",
        "key": "shift+alt+[ArrowRight]",
        "when": "textInputFocus"
    },

etc.

However, the command in vscode v1.85.1 seems to be cursorWord**Part**Right etc. After adding the Part to the commands, camel hump navigation works fine for me 😊

(Honoring camel humps when selecting via double-click is also not working, not sure how to fix it though)

Thanks for maintaining this extension!

kasecato commented 4 months ago

I'll update a README.md. We can't support the double-click option for now

kasecato commented 3 months ago

Released v1.6.1