Sublime Text Home/End keys default functionality jumps to the beginning and end of the file.
Fix Home and End keys to move the cursor to the beginning and end of lines.
Preferences > Key Bindings - User
Adding the following to the array:
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} },
{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true } }
You can now use the following combinations:
- Go to beginning of line: Home
- Go to end of line: End
- Select from cursor position to beginning of line: ⇧ + Home
- Select from the cursor position to end of line: ⇧ + End
This has been driving me bonkers, and my own attempts to tweak the keymappings weren't working. Thank you!