Sublime Forum

Is there a way to go to the end of line (including wrap?)

#1

Let’s say I have a line which is wrapped, so it appears as 3 lines on the screen.
Is there a way to move to the end of the entire line, i.e. to the end of the 3rd line on the screen?

This is useful for multiple selection - sometimes you want to add something to the end of every line.

Thanks

0 Likes

#2

There’s no key binding for it, but there is a command, so you can bind a key to it. end is normally bound to “moveTo eol”, and home is bound to “moveTo bol”. If you replace the eol/bol with hardeol/hardbol, then it’ll ignore word wrapping.

0 Likes

#3

Brilliant.
This also solved another question I had (how to move to the beginning of line, instead of zigzagging between the beginning and the first char). Also very useful for multiple selections.

I bound it to alt+home/alt+end, if anyone is interested.

Thanks!

0 Likes