Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save peschee/2c7abed3f9511e562552 to your computer and use it in GitHub Desktop.
Save peschee/2c7abed3f9511e562552 to your computer and use it in GitHub Desktop.
Sublime Text 2 fix for OSX home/end keys
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} }
@peschee
Copy link
Author

peschee commented Feb 3, 2016

Wow, great! This is the #1 hit on Google for "sublime text home end", for good reason. These tips have unfscked my Home and End keys! Much appreciation.

Here's all of the suggested edits on this page so far, all edited together, for your convenience:

[
 { "keys": ["home"],             "command": "move_to", "args": {"to": "bol"                 } },
 { "keys": ["end"],              "command": "move_to", "args": {"to": "eol"                 } },
 { "keys": ["shift+home"],       "command": "move_to", "args": {"to": "bol", "extend": true } }, 
 { "keys": ["shift+end"],        "command": "move_to", "args": {"to": "eol", "extend": true } },
 { "keys": ["super+home"],       "command": "move_to", "args": {"to": "bof"                 } },
 { "keys": ["super+end"],        "command": "move_to", "args": {"to": "eof"                 } },
 { "keys": ["super+shift+home"], "command": "move_to", "args": {"to": "bof", "extend": true } },
 { "keys": ["super+shift+end"],  "command": "move_to", "args": {"to": "eof", "extend": true } }
]

Whitespace added for readability. Simply cut and paste into your keymap file (Sublime Text 2 / Preferences / Key Bindings - User). Takes effect immediately, as soon as that file is saved!

Josh

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