Sublime Forum

Feature Request: Simpler Navigation for Files & Hunks (J/K/N/P)

#1

Sublime Merge can already jump between Files and tab between Hunks which is good, but the focus has to be in the right spot. When I’m browsing big diffs (many files, many hunks) in Sublime, it feels a little bit “fiddly”. I want to review “the next thing”, and pressing up&down usually does the wrong thing.

  • Sometimes up&down changes file.
  • Sometimes up&down changes commits (completely ruining my train of thought).

A good example: I use Bitbucket Server for git hosting at work. And there are two sets of keybindings I use regularly.

  • J/K = up/down hunks
  • N/P = up/down files

I can review a huge PR almost one handed.

Is it possible to bind these keys globally within the app… “No matter which pane my focus is in, any time I tap J, go to next hunk” for example.

Obviously if a Text box is focused, it won’t work. Same happens in Bitbucket: if you’re typing a comment then J,K,N&P all work as expected. As soon as I’ve submitted the comment (or otherwise “finished typing”) then my hand rests back on J&K and I keep reviewing the code.

What do you think? Maybe I’m missing the master course in Sublime Merge Navigation and you guys have invented a “Sublime” way to browse one handed (which I’d be all for).

1 Like

#2

I don’t think this is possible with key bindings currently, at least as far as I can see. The Tab key will jump you to the next hunk, but you can’t jump to the next file with it, and it will also cycle you through panels like the graph as well.

The best place to place feature requests like this is in the tracker; Tools > Report a Bug will take you there, where you can click the Enhancement Request button.

0 Likes