Home Download Buy Blog Forum Support

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

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

Postby bigo on Mon Jan 31, 2011 9:10 pm

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?
bigo
 
Posts: 2
Joined: Mon Jan 31, 2011 8:44 pm

Re: ctrl-arrow (left/right) not working on Mac OS X?

Postby bigo on Mon Jan 31, 2011 9:24 pm

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

and was able to put this together:
Code: Select all
   { "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?
bigo
 
Posts: 2
Joined: Mon Jan 31, 2011 8:44 pm

Re: ctrl-arrow (left/right) not working on Mac OS X?

Postby jps on Mon Jan 31, 2011 9:32 pm

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
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 19 guests