Sublime Forum

Cursor Location on the line for each press of ctrl-a

#1

I am using emacs keybindings on Sublime Text via [Emacs Pro Essentials][1].

In emacs when I type ctrl-a the cursor goes the beginning of the line (most left point), later when I press ctrl-a again the cursor goes to starting point of the line and it continues this operation.

       hello    //<ctrl-a> pressed
 ^

       hello    //<ctrl-a> pressed        
       ^

       hello    //<ctrl-a> pressed
 ^

=> Is it possible to have this approach on sublimeText? If yes, how?

0 Likes

#2

Didn’t use Emacs Pro Essentials. But generally, in ST, you just have to add a custom keybinding.

{ "keys": ["ctrl+a"], "command": "move_to", "args": { "extend": false, "to": "bol" } },

This is what the Home key does.

1 Like

#3

Thanks @jfcherng on the second press of ctrl-a I want it to go to beginning of the first character on the line. (I am not sure it is possible)

0 Likes

#4

I think that is exactly what ST does by default.

1 Like

#5

It works thanks!

0 Likes