Sublime Forum

word_separators question

#1

Does anyone know what I need to do to the word_separators preference to make pressing CTRL+SHIFT+RIGHT_ARROW once select the text as shown in the image? This behavior is common in other editors that I’ve used, and I can’t figure out how to replicate it in ST3.

The cursor starts just after the opening curly brace on the first line, and ends up just before the first printable character on the second line.

With the current (default) configuration, I must press CTRL+SHIFT+RIGHT_ARROW, CTRL+SHIFT+RIGHT_ARROW, CTRL+SHIFT+LEFT_ARROW to achieve the same result.

I tried adding a single space to word_separators but that makes the problem far worse.

0 Likes

#2

I wanted to do something similar, but not quite the same. I prefer to stop at the end of the line, and after asking on here, ended up using the following key binding:

{ "keys": "ctrl+shift+right"], "command": "move", "args": { "forward": true, "extend": true, "by": "stops", "word_begin": true, "word_end": false, "line_begin": true, "line_end": true, "punct_begin": true, "punct_end": false } },
I think you’ll get what you want with that, except change line_end and line_begin to false (or just omit them, I think they’ll default to false. For more info, check jps’s response to my post. I didn’t need to do anything with word_separators.

1 Like

#3

Exactly right. Thank you very much.

{ "keys": "ctrl+shift+right"], "command": "move", "args": { "forward": true, "extend": true, "by": "stops", "word_begin": true, "punct_begin": true, } }

I modified “ctrl+shift+left”, “ctrl+right”, and “ctrl+left” to match the intended behavior in each case.

Thank you very much!

0 Likes