Skip to content

Instantly share code, notes, and snippets.

@ihor-lev
Last active November 1, 2024 21:53
Show Gist options
  • Save ihor-lev/120e4c822d145f690f90a3fee77e2e53 to your computer and use it in GitHub Desktop.
Save ihor-lev/120e4c822d145f690f90a3fee77e2e53 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

@raja-em
Copy link

raja-em commented Oct 20, 2023

You are my man!! love you..

@ram4279
Copy link

ram4279 commented Feb 22, 2024

God bless yall. Thank you

@yoavniran
Copy link

Thank you, thank you!

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