Sublime Forum

Bug: jump-to-end of line in word wrap mode

#1

When word wrap mode is on, jump to end of line goes to the end of the on-screen line, not the actual line, e.g:

this is some long text <-- cursor would go here
that gets wrapped <-- cursor should go here

0 Likes

#2

exp.:

v2192

0 Likes

#3

This is working as designed.

You can change the key binding if you’d like this behavior, changing the “eol” argument to move_to to “hardeol”

0 Likes

Vintage mode, end of line (g$)
#4

Okay, I added the one and it works. Can’t figure out the others though:

, { "keys": "super+right"], "command": "move_to", "args": {"to": "hardeol"} } , { "keys": "super+shift+right"], "command": "expand_selection", "args": {"to": "hardeol"} }

I need ‘select-to-end-of-line’ (trying to get above). Also, is there an intermediate command between ‘bol’ and ‘hardbol’? I want the bol to work the same (first non-whitespace, then hard)

Also, I vote that the behavior is incorrect and should be flipped by default. EOL behavior should not be different depending on whether or not word-wrap is on and what the wrap setting is set to. Multiple cursors suddenly lose half of their value with word-wrap on because EOL goes to different positions with different cursors and I don’t see any way to align them to “hard eol” without flipping this option.

1 Like

#5

I agree this seems incorrect to me.

And also need an equivalent for the bol that ignores the whitespace
I set mine to ctrl+alt+home and Ctrl+alt+shift+home

0 Likes

#6

I know this is super necromancing this thread, but this ‘feature’ has been frustrating me for ages, and this thread showed up on google and pointed me in the right direction. Here is the full bindings I ended up with:

[
    {
        "keys":
        [
            "super+left"
        ],
        "command": "move_to",
        "args":
        {
            "to": "hardbol",
            "extend": false
        }
    },
    {
        "keys":
        [
            "super+shift+left"
        ],
        "command": "move_to",
        "args":
        {
            "to": "hardbol",
            "extend": true
        }
    },
    {
        "keys":
        [
            "super+right"
        ],
        "command": "move_to",
        "args":
        {
            "to": "hardeol",
            "extend": false
        }
    },
    {
        "keys":
        [
            "super+shift+right"
        ],
        "command": "move_to",
        "args":
        {
            "to": "hardeol",
            "extend": true
        }
    }
]
0 Likes