vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Allow opening file instead of diff

Open rryk opened this issue 4 years ago • 7 comments

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.

rryk avatar Sep 22 '21 12:09 rryk

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.

gspencergoog avatar Dec 08 '21 18:12 gspencergoog

Sounds like a good enhancement. Thanks!

eamodio avatar Dec 22 '21 04:12 eamodio

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.

gspencergoog avatar Aug 09 '22 15:08 gspencergoog

Is this option inline sufficient for this feature?

image

marcoapcaldas avatar Feb 10 '23 11:02 marcoapcaldas

@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.

gspencergoog avatar Feb 10 '23 17:02 gspencergoog

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 ?

marcoapcaldas avatar Feb 16 '23 23:02 marcoapcaldas