Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move to end of line without [END] key in sublime Text2?

Tags:

sublimetext2

I have read the key bindings file of Sublime Text 2

{ "keys": ["end"], "command": "move_to", "args": {"to": "eol", "extend": false} },

I'm wondering if we can move to the end of line without END key in keyboard.

In vim, I just ESC and A, then the cursor would be in the end of line.

like image 274
hellotli Avatar asked Sep 11 '25 06:09

hellotli


2 Answers

To change the key binding, open Key Bindings - User preferences and add a new line between the square brackets. For example, to set the key binding to Control-Alt-Command-A you'd use:

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

If this line that you're adding is not the last line before the closing square bracket, then you'll need to include a comma at the end of the line. For example:

[
{ "keys": ["ctrl+alt+super+a"], "command": "move_to", "args": {"to": "eol", "extend": false} },
{ "keys": ["ctrl+shift+t"], "command": "open_recent_file", "args": {"index" : 0} },
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
]

You should check the Key Bindings - Default preferences to make sure that the key binding you're setting here doesn't conflict with anything else that you might use.

You shouldn't edit the Key Bindings - Default preferences directly, because they will be overwritten in Sublime Text 2 upgrades.

like image 104
James Chevalier Avatar answered Sep 13 '25 07:09

James Chevalier


Command+RightArrowKey on Mac. Control+RightArrowKey on Windows

like image 42
Yiling Avatar answered Sep 13 '25 06:09

Yiling



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!