From c86b1b765af625c70fa23908f09eda88620b8be7 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Fri, 13 May 2022 17:03:31 +0200 Subject: [PATCH] git:core.pager: Update flags Remove `-g` as it was put in place for a better experience with the search pattern that `less` was started with. Readd `-F` as it was explicitly unset when the search pattern was introduced. Do not readd `-X` as I like output that is too long (e.g. `log`, `show`) to be kept in alternate mode and out of my scrollback buffer. See: - 17433d052871 ("git:core.pager: Remove the search pattern") > This gets really annoying as it complains in many cases that it cannot > find a match for the pattern when the pager is used for other things > than commits. - 093c3a6f9c33 ("git: Highlight current match in pager") - 7e0e0f5baf57 ("git: Enable jumps between different files in diff") > Jump between file sections and commits by using n and N. Taken from: > https://github.com/so-fancy/diff-so-fancy/blob/eef379ee43f/pro-tips.md > > Remove FX flags since they are incompatible with the pattern search: > When showing a small change that fits on less than the screen height, > the rest of the screen is filled with ~ lines instead of quitting the > pager. This behaviour is annoying and thus the flags are deactivated. > Since git adds them per default they have to be explicitly disabled. --- .config/git/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/git/config b/.config/git/config index 6bce376..3d0ed31 100644 --- a/.config/git/config +++ b/.config/git/config @@ -29,7 +29,7 @@ verbose = true [core] abbrev = 12 - pager = diff-so-fancy | less --tabs=8 -Rg -+FX + pager = diff-so-fancy | less --tabs=8 -RF [diff] submodule = log tool = nvimdiff