Sublime Forum

Can't seem to find a way to stage files using the keyboard?

#1

I just downloaded Sublime Merge today, to try out.

I can’t seem to find a way to stage files using the keyboard?

(I’m on a Mac. When I right-click on a tab I see “Stage” with a “Shift + Enter” keyboard shortcut, but “Shift + Enter” isn’t staging the file. What am I missing?)

P.S. It seems that my cursor has to be in the file’s content for the keyboard shortcut to work? It doesn’t work if the focus is in the file list on the left, or above the content on the right?

0 Likes

#2

Hi @michaellenaghan,

Thanks for reaching out!

You can navigate through the diffs using the tab key, and use enter to stage individual hunks, or shift + enter to stage entire files.

If you are selecting files in the Files side bar, then you can use the enter key to stage the files quickly in succession.

Additionally, if you’d like to stage entire sections, you can use the following keybindings:

  • Stage All Modified: cmd + shift + a
  • Stage All: cmd + k, cmd + a
  • Unstage All: cmd + shift + r

I hope this helps!

Kind regards,
- Dylan from Sublime HQ

0 Likes

#3

You can navigate through the diffs using the tab key, and use enter to stage individual hunks, or shift + enter to stage entire files.

Thanks, Dylan.

On the diff side the focus ring disappears after I Stage, leaving me unsure of where my focus really is. Hitting the up or down arrow makes it appear again — but only for a moment. And then it disappears.

On the Files side hitting Enter works. But when I get to the end of a block — e.g., Modified Files — focus shifts back up to the first modified file after I Stage, making me arrow down again to get to where I was.

The fact that Untracked Files are collapsed is also… not ideal. (I knew from using ST that right arrow would expand it, so that was good!)

One last bit of feedback: things like Stage don’t show up in the menus. That makes it harder to see what all of the available commands are — and what their shortcuts are.

FWIW!

Michael

0 Likes