Sublime Forum

Keyboard navigation is different after upgrading to 3

#1

I’m using the default configuration, which is the same in both ST2 and ST3.

	{ "keys": "ctrl+left"], "command": "move", "args": {"by": "words", "forward": false} },
	{ "keys": "ctrl+right"], "command": "move", "args": {"by": "word_ends", "forward": true} },
	{ "keys": "ctrl+shift+left"], "command": "move", "args": {"by": "words", "forward": false, "extend": true} },
	{ "keys": "ctrl+shift+right"], "command": "move", "args": {"by": "word_ends", "forward": true, "extend": true} },

But now when I move left and right, it’s different. It’s really throwing off my muscle memory, enough to just keep using ST2.

For example, letting ‘_’ indicate the cursor,

// ST2
x = f(a + (b + longname)))_
x = f(a + (b + longname_)))    // ctrl+left
x = f(a + (b + longname)))_    // ctrl+right

// ST3
x = f(a + (b + longname)))_
x = f(a + (b + _longname)))    // ctrl+left -- this makes it difficult to select the end of a variable when enclosed with parentheses
x = f(a + (b + longname_)))    // ctrl+right
x = f(a + (b + longname)_))    // ctrl+right -- this is way too many keystrokes to get to the next meaningful place
x = f(a + (b + longname))_)    // ctrl+right
x = f(a + (b + longname)))_    // ctrl+right

Note that changing the config of ctrl+left/right to use ‘word_boundaries’ makes it way too eager, going through each operator one-at-a-time like the ST3 ctrl+right example above.

How can I make ST3 navigate like ST2 out-of-the-box? Is there another configuration variable I need to override?

Thanks.

0 Likes

#2

I know that word navigation has been changed and I don’t think it’s a setting. You could try moving by subword (alt + direction). I believe that would give you the behavior you want.

On an unrelated note, this post reminded me of this XKCD.

0 Likes

#3

Thanks. I tried with subword navigation. It’s a workaround. After using it a week, it really does add too many keystrokes to use as the default navigation. And the “smarter” navigation adds too many keystrokes for tweaking non-trivial expressions.

Seems there’s no happy medium anymore. It’s also interesting how words and subwords now have different behavior, aside from selecting subwords. I wonder if subwords will be “fixed” in future versions.

Ha, good ol’ XKCD. I’m sure any change could remind you of this. A core keyboard navigation change is a bit more direct than a bug fix with a coincidental effect though. It needlessly requires an upgrade of your muscle memory.

0 Likes

#4

You could probably do some stuff with context so the subword move is used depending on the surrounding characters (probably the preceding_text and following_text contexts). Yea, I dunno why this particular post reminded me of it more than other people asking about changes.

0 Likes