From 4f44fbe555b11984fa8b369846f3180d4973fb1c Mon Sep 17 00:00:00 2001 From: Mat Jones Date: Wed, 6 Sep 2023 12:18:24 -0400 Subject: [PATCH] feat(fzf): Bind ctrl+d & ctrl+f to scroll fzf preview down/up respectively --- home-manager/modules/fzf.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/home-manager/modules/fzf.nix b/home-manager/modules/fzf.nix index 0cf2aa22..b803a927 100644 --- a/home-manager/modules/fzf.nix +++ b/home-manager/modules/fzf.nix @@ -27,7 +27,13 @@ in { programs.fzf = { enable = true; defaultCommand = "${pkgs.ripgrep}/bin/rg --files"; - defaultOptions = [ "--prompt=' '" "--marker=''" "--marker=' '" ]; + defaultOptions = [ + "--prompt=' '" + "--marker=''" + "--marker=' '" + # this keybind should match the telescope ones in nvim config + ''--bind="ctrl-d:preview-down,ctrl-f:preview-up"'' + ]; fileWidgetCommand = "${pkgs.ripgrep}/bin/rg --files"; fileWidgetOptions = [ # Preview files with bat