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:

ss 2013 07 31 at 11 19 26 AM

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} }

facebook share2

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

Master Gatsby

Master Gatsby

Building modern websites is tough. Preloading, routing, compression, critical CSS, caching, scaling and bundlers all make for blazing fast websites, but extra development and tooling get in the way.

Gatsby is a React.js framework that does it all for you. This course will teach you how to build your websites and let Gatsby take care of all the Hard Stuff™.
I post videos on and code on

Wes Bos © 1999 — 2022

Terms × Privacy Policy