gitkraken / vscode-gitlens

Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more
http://gitkraken.com/gitlens
Other
8.96k stars 1.29k forks source link

Allow opening file instead of diff #1651

Open rryk opened 3 years ago

rryk commented 3 years ago

When clicking on the filename in "Search & Compare", it opens a diff by default. To open the file itself one needs to right-click and select "Open File". Would be nice to have a setting to open files by default. This is similar to https://github.com/microsoft/vscode/issues/36885, but for GitLens panels.

gspencergoog commented 2 years ago

This is the default behavior for Gitscope on IntellliJ, and I find it to be incredibly helpful there. It lets me use the current list of diffs from the main branch as a workspace that contains only the files I'm working on for the current change. With the need to click on a small icon to open the file instead of the diff, it makes me think about opening a file more carefully, and slows me down.

eamodio commented 2 years ago

Sounds like a good enhancement. Thanks!

gspencergoog commented 2 years ago

The VSCode git extension has an option called "git.openDiffOnClick" that does exactly what this feature request describes. It would be nice if GitLens had this too.

marcoapcaldas commented 1 year ago

Is this option inline sufficient for this feature?

image

gspencergoog commented 1 year ago

@marcoapcaldas No, because it's about the default: both the diff and the file icons are available, but the diff is the default when you click on it, and I'd much prefer it be the file. I'm constantly accidentally opening the diff window, immediately closing it, and then having to focus to click the tiny file icon, which takes me out of my flow.

marcoapcaldas commented 1 year ago

I'm trying to find which files I should work on to make this feature, but I hadn't sucess. Could you give me some tips @eamodio ?

EhabY commented 1 week ago

Given that the old PR is more than a year old, I have submitted another PR to fix this issue https://github.com/gitkraken/vscode-gitlens/pull/3583