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.

https://www.youtube.com/watch?v=ngTMcHFDuQ8&hd=1

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