Sublime Forum

Accidentally pressing CMD+ARROW UP

#1

Hello! Sometimes it happens that instead of pressing CMD+RIGHT ARROW, in order to go to the end of the line, I press CMD+ARROW UP, so the text cursor goes in the very beginning of the file.
When it happens I press CMD+Z and the text cursor goes back where I was editing but obviously it undo the latest action.
How can I go back to the part of the file that I was editing without losing the selection?

Last second edit, I can press CMD+Z and then CMD+MAIUSC+Z.
If you have got any other ideas you can tell me, but I think this is the best solution :smiley: :smiley:

0 Likes

#2

I need this keyboard because I have no space on my desk and apart from the tiny arrow keys it is great. It is easy to press the up keys even when you press CMD + (RIGHT)SHIFT

0 Likes

#3

“Edit > Undo Selection > Undo *”, or whatever keys that is bound to on OSX.

0 Likes

#4

A good command to undo an unwanted movement without undoing changes is “Goto | Jump Back”, which is bound to CTRL minus (on OSX at least).

0 Likes

#5

cmd+u

0 Likes

#6

Yes, cmd+u will undo cursor movements and selection changes.

Presently [home] goes to beginning of line, and [end] to the line end. If you find yourself hitting Cmd+ArrowUp a lot you could also rebind it to go to beginning of line… Add this line inside the square brackets in “Prefs…Keybindings…User”:

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

:smile:

0 Likes