Sublime Forum

Word Selection in 2197

#1

I am growing more and more frustrated with word selection in Sublime. By word selection, I mean either double-click mouse selection or alt+shift+arrow selection using the keyboard.

I’ve been trying to figure out why it feels so broken compared to other text fields on OSX, and I’ve spent hours trying to tweak the ‘word_separators’ setting to no avail.

Jon- if you are able to add a setting to treat each character in ‘word_separators’ as its own ‘word’ during word selection, or at least add a strict mode for this type of movement so that the characters in ‘word_separators’ are NEVER grouped with other characters to form words (including spaces, tabs, line breaks), that would be a huge improvement.

Thanks again for all your work on Sublime. I still love it, despite the crazy word selection. :cry:

Here’s my related topic on user echo, from 4 months ago:
sublimetext.userecho.com/topic/9 … selection/

0 Likes

#2

Strangely, unlike Windows and Linux, there is no alt+shift+arrow on OSX:

[code] { “keys”: “ctrl+alt+left”], “command”: “move”, “args”: {“by”: “subwords”, “forward”: false} },
{ “keys”: “ctrl+alt+right”], “command”: “move”, “args”: {“by”: “subword_ends”, “forward”: true} },
{ “keys”: “ctrl+alt+shift+left”], “command”: “move”, “args”: {“by”: “subwords”, “forward”: false, “extend”: true} },
{ “keys”: “ctrl+alt+shift+right”], “command”: “move”, “args”: {“by”: “subword_ends”, “forward”: true, “extend”: true} },

{ "keys": "ctrl+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
{ "keys": "ctrl+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
{ "keys": "ctrl+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": "ctrl+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },[/code]
0 Likes

#3

Probably because alt+arrow word movement is native on OSX textfields.

0 Likes

#4

To illustrate where the characters should split into words, I updated the last frame of my example gif:

http://sublimetext.userecho.com/s/attachments/201206/i_35.png

0 Likes

#5

This may or may not be a dead topic but I have to wholly agree with the problem.

It doesn’t appear the word selection using the mouse uses the word_separators (which is the default) setting to determine where to stop selecting.
I think this may be a Windows problem (because all programs seem to select this way) and not limited to Sublime Text 2, none the less it is very annoying.

Example is I write PHP code and have lots of places where I may want to select a string which may end like this some phase’)");
In many cases it probably does work fine but I only notice where it stops on selecting phrase just before the ’ but any movement beyond that and it captures the ')");

I use nightly in case that makes any difference.

And otherwise I love Sublime Text, by far the best editor there is!

0 Likes