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
Really appreciate this! It was very annoying having it jump all the way to the top of the file or end of the file. Glad I wasn't the only one.