Home Download Buy Blog Forum Support

Keyboard shortcut to go to beginning/end of line?

Keyboard shortcut to go to beginning/end of line?

Postby Afterglow375 on Fri Jul 26, 2013 2:31 pm

I'm using sublime text 2 on windows. Are there keyboard shortcuts to go to the beginning and end of a line? If not, how I can I create them? And is there an official list of keyboard shortcuts anywhere? Can't seem to find one.
Afterglow375
 
Posts: 3
Joined: Wed Jul 24, 2013 4:50 pm

Re: Keyboard shortcut to go to beginning/end of line?

Postby qgates on Fri Jul 26, 2013 2:39 pm

Home and End?

:)
qgates
 
Posts: 205
Joined: Mon Nov 05, 2012 4:33 pm

Re: Keyboard shortcut to go to beginning/end of line?

Postby Afterglow375 on Fri Jul 26, 2013 3:20 pm

Well that works, thanks. But it seems a bit inconvenient to press... Is there a way to rebind it? I was thinking Ctrl+Alt left/right arrow.
Afterglow375
 
Posts: 3
Joined: Wed Jul 24, 2013 4:50 pm

Re: Keyboard shortcut to go to beginning/end of line?

Postby handycam on Fri Jul 26, 2013 3:36 pm

on the mac, it's command-left and command-right
Mac OS 10.9.3
ST 3 (3059)
handycam
 
Posts: 271
Joined: Tue Jan 03, 2012 2:42 pm

Re: Keyboard shortcut to go to beginning/end of line?

Postby skuroda on Fri Jul 26, 2013 3:38 pm

Add the following entries to your user key bindings.
Code: Select all
{ "keys": ["ctrl+alt+left"], "command": "move_to", "args": {"to": "bol", "extend": false} },
{ "keys": ["ctrl+alt+right"], "command": "move_to", "args": {"to": "eol", "extend": false} }


For future reference, you can rebind any keys you want in a similar fashion. Simply look up the command in the key binding file. Alternatively, if you know of a key combination that executes the command you want, you may enter "sublime.log_commands(True)" in the console. Then press the appropriate key binding. This will print out the command being executed to the console and the associated arguments.
skuroda
 
Posts: 677
Joined: Fri Oct 05, 2012 8:11 am

Re: Keyboard shortcut to go to beginning/end of line?

Postby Afterglow375 on Fri Jul 26, 2013 3:52 pm

Great, worked perfectly, thanks a lot.
Afterglow375
 
Posts: 3
Joined: Wed Jul 24, 2013 4:50 pm


Return to General Discussion

Who is online

Users browsing this forum: alkuzad, aziz, Google [Bot] and 27 guests