Proper go to end of line with Sublime Text

Proper go to end of line with Sublime Text

When working with wrapped lines in Sublime Text, the default go to End of line doesn't work as expected. When you hit  cmd + → it will bring you to the end of the visual line, something you rarely want when working with wrapped lines:

Watch the video and read below on a quick fix to this problem.

The solution to this is to overwrite the default key bindings and set it to move to hardeol rather than just eol.

Place the following keyboard shortcuts in your key bindings file located at Preferences → Key Bindings - User. The first two control the jump to end and beginning of line while the second two do the same, but while selecting the text.

You may want to update the key bindings based on your own preference.

// Fix End of line
,{ "keys": ["super+right"], "command": "move_to", "args": {"to": "hardeol", "extend": false} }
// Fix Beginning of line
,{ "keys": ["super+left"], "command": "move_to", "args": {"to": "hardbol", "extend": false} }
// Fix end of line + select
,{ "keys": ["super+shift+right"], "command": "move_to", "args": {"to": "hardeol", "extend": true} }
// Fix beginning of line + select
,{ "keys": ["super+shift+left"], "command": "move_to", "args": {"to": "hardbol", "extend": true} }

Find an issue with this post? Think you could clarify, update or add something?

All my posts are available to edit on Github. Any fix, little or small, is appreciated!

Edit on Github

Syntax Podcast

Hold on — I'm grabbin' the last one.

Listen Now →
Syntax Podcast

@wesbos Instant Grams

Beginner JavaScript

Beginner JavaScript

A fun, exercise heavy approach to learning Modern JavaScript from scratch. This is a course for absolute beginners or anyone looking to brush up on their fundamentals. Start here if you are new to JS or programming in general!
I post videos on and code on

Wes Bos © 1999 — 2024

Terms × Privacy Policy