Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simsicon/71234e4210a3d72b4d4161f9d802f673 to your computer and use it in GitHub Desktop.
Save simsicon/71234e4210a3d72b4d4161f9d802f673 to your computer and use it in GitHub Desktop.
Fix Sublime Text Home and End key usage on Mac OSX

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

Fix Sublime Text Home and End key usage on Mac OSX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment