instead of the current default behavior, you can make it so they jump from word selections to word selections, as in:
http://img02.imgland.net/pQIW0n.gif
why might you prefer this alternative behavior?
- most often you just want to navigate to some word and edit it. in that kind of case, this remapping combines movement and selection in one package, saves you the need to perform an extra act of selection. once you’ve arrived your destination you can proceed to edit right away
- this alternative behavior is also more intuitively predictable. watch the video a couple of times and you can form pretty confident “gut” predictions about what will happen when you execute another act of [ctrl+left/right]. The current default behavior of ctrl+left/right is not as predictable. You never feel very sure where the caret will land —— will it stop at the left of that quotation mark or the right?
- as you navigate your way forward you also get a lot of extra visual information along the way you don’t get with the default behavior. E.g. the length of the word, and also information from sublime’s automatic highlighting of duplicates.
- even if your plan is not to eventually edit/delete/copy some word, you’re only one extra press of [left] or [right] away (which your right hand is already pressing) from cancelling the selection and get off at its left/right end.
if you wan to give it a try, just remap your ctrl+left/right (or any other key combo you prefer) to these two macros
(edit: macro order was wrong as legosublime pointed out; now corrected. please also see below frou’s post below for quickly trying out!)
macro 1 (for ctrl+right):
[
{
"args":
{
"by": "stops",
"forward": true,
"word_begin": true
},
"command": "move"
},
{
"args":
{
"to": "word"
},
"command": "expand_selection"
}
]
macro 1 (for ctrl+left):
[
{
"args":
{
"by": "stops",
"forward": false,
"word_end": true
},
"command": "move"
},
{
"args":
{
"to": "word"
},
"command": "expand_selection"
},
]