-
-
Save coldnebo/1730936 to your computer and use it in GitHub Desktop.
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} }, | |
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} } |
If you'd like to add support for using Cmd+ to go to the beginning/end of the file, it's pretty easy! Just add these lines:
{ "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} }
Thank you, pressed it several times to celebrate.
Amazing - always frustrated me how "Home/End" keys didn't work properly in OS X.
Very nice! The life is a joy again.
Thanks for this! Just an FYI - this works totally fine in Sublime Text 3 on OSX!
+1 you made my day
Kind of late, but thank you for this! It still works in Sublime Text 3 too!
nice,huge thanks.
Thanks, it's been driving me crazy.
And just like that, I was 50% more productive. Thanks!
Thanks!!
i believe in GOD now !
much thanks.
many many thanks, this a great frustration relief.
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
You da man Josh! And kudos OP's for this life-enhancement.
Thank. God. Cheers!
This has made my day.
A life saver, thanks guys, I'm moving from Windows to OSX and this was driving me insane in every editor, I might actually decide to buy Sublime after this great fix. Thanks a lot everyone.
Oh thank you so much.
for the love of all that is holy, THIS IS WONDERFUL. Thank you Krellan!!
It works. Thanks a lot!
@kellan, godly
@ everyone else: you need this comment.
Incredible.
@Dayjo Thank you very much. This saves the day.
Wunderbar! Thanks for sharing this guys. This makes me happy.
Exactly what I was looking for. Thanks!
Yes! Thanks!
very nice, also looseroots for the selection thingy
I added also support for the command key: https://gist.github.com/mnme/5235936