vim-flog icon indicating copy to clipboard operation
vim-flog copied to clipboard

Highlighting a branch

Open TamaMcGlinn opened this issue 4 years ago • 2 comments

GitExtensions has this really important feature for having a good overview of the git log graph; the currently checked out branch is displayed in colour and all others gray. So if you execute :Flog -all then you see some commits above your current commit, but they are displayed in gray.

GitExtensions also has 'cntrl-shift-b' which makes the commit under the cursor coloured, and all its ancestors (everything else is gray). That means in a convoluted mess of merges, you can go to a commit and do that to see how that branch goes through the commit history. The highlighting remains until you press another keybinding to revert to the normal colouring again.

I think these are really important features also for VimFlog to have.

TamaMcGlinn avatar Feb 03 '21 10:02 TamaMcGlinn

Sorry for not answering this for a long time. This is another issue complicated by the fact that Flog is just a wrapper around git log. With a more fully fledged branch viewer you'd have a commit structure available so you can see things like ancestry, since you built the graph itself. We don't have that.

I'm hesitant to change how Flog works without a lot of support. There are other issues like #26 that this would solve too. But it's quite a rewrite and would change Flog a lot. Leaving this open.

rbong avatar Mar 07 '21 16:03 rbong

I have some experimental commits lying around that highlight the branch by making bold the text of every commit which is included in the current branch. It's a bit ugly, but it works. However, my first implementation is too slow to consider for a PR yet. If interested you can look into my fork branch bold_current_branch, or the version in branch_highlight which lets you pick a commit to highlight.

TamaMcGlinn avatar May 27 '21 07:05 TamaMcGlinn