Sublime Forum

Move cursor between subwords

#1

Hey guys, i’ve been trying to get the keybinding ctrl+left/right to work in st3. it moves the cursor between subwords. this used to work in st2 but it stopped working when i moved to st3. i’ve checked in the default keybindings and the command is there though it doesn’t work.
I even made a quick video showing what’s being logged while trying to execute the commands: recordit.co/pJzmnA (when i do ctrl+left/right nothing is being logged)

Does anyone can help?

1 Like

#2

Isn’t the correct keybinding ALT+LEFT/RIGHT ?

1 Like

#3

alt+left/right move the cursor to the end of words, not subwords. it’s a different thing.

1 Like

#4

[quote=“rafaelrinaldi”]

alt+left/right move the cursor to the end of words, not subwords. it’s a different thing.[/quote]

Are you sure ?

{ "keys": "alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} }, { "keys": "alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },

1 Like

#5

[quote=“bizoo”]

alt+left/right move the cursor to the end of words, not subwords. it’s a different thing.
Are you sure ?

{ "keys": "alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} }, { "keys": "alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },[/quote]

I’m using ST3 and here are my default keybindings for this:

{ "keys": "ctrl+left"], "command": "move", "args": {"by": "subwords", "forward": false} }, { "keys": "ctrl+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },

Anyways, I’ve disabled two Emmet commands:

{ "disabled_keymap_actions": "prev_edit_point, next_edit_point" }

Now I’m able to jump between subwords with ctrl+opt+left/right but still doesn’t work with ctrl+left/right which is the expected.

1 Like

#6

Didn’t see your on Mac.
But your console on your video show move by “words” not “subwords”.

IMHO, you have somewhere a keybinding that redefine the standard ones, or it’s an OS issue.

1 Like

#7

[quote=“bizoo”]Didn’t see your on Mac.
But your console on your video show move by “words” not “subwords”.

IMHO, you have somewhere a keybinding that redefine the standard ones, or it’s an OS issue.[/quote]

On the video you’re not able to see the log for moving the cursor between subwords because it doesn’t work. When nothing is being logged is because i’m hitting ctrl+left/right.
I’ve checked the keybindings with the help of FindKeyConflicts and there’s nothing overriding it.

Not sure of what’s going on.

1 Like

#8

Try to enable the log_input:

>>> sublime.log_input(True) key evt: control+right
If the keypress is not logged, then it’s probably swallowed by OS.
But I don’t know why it works on ST2 and not and ST3.

1 Like

#9

I think by default ctrl+arrows are bound to move between spaces. Go into your system prefs and unbind them, and they should work in Sublime.

1 Like