Sublime Forum

Ctrl-arrow (left/right) not working on Mac OS X?

#1

on my mac, ctrl-left and ctrl-right are behaving the same as cmd-left and cmd-right (“super-left” and “super-right”, respectively, per the Sublime configs) - that is, they are jumping to the beginning and end of the line, rather than going through a (specially-delimited) word at a time.

i can’t find these in the keybindings file, so i don’t know the command name to overwrite whatever is setting this. i checked my OS X keybindings (Keyboard prefpane) but there’s nothing bound to those keys that could be interfering. anyone seen this issue and know what could be causing it?

0 Likes

#2

i discovered this page:
sublimetext.com/docs/commands

and was able to put this together:

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

ctrl-arrow now has the exact same behavior as option (alt)-arrow. i was trying to get this setup exactly like TextMate, where option-arrow goes over whole (traditional) words (that is, those separated by whitespace), while ctrl-arrow goes over “pseudo-words”, namely those separated by certain punctuation (and notably absent from Sublime Text, also by camelCase within words). Is it currently possible to get this behavior?

0 Likes

#3

There’s no build in arguments to the move command that will move by sub-words, but it is possible to write a plugin to do it

0 Likes