From b7bd4879b0fa2fea5f553e6ae42a0940d1bf77ed Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Fri, 11 Oct 2024 10:25:31 -0500 Subject: [PATCH] Add a better Git grep command --- home/modules/baseline/vim/config.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/home/modules/baseline/vim/config.nix b/home/modules/baseline/vim/config.nix index 33e4de2..652b8cd 100644 --- a/home/modules/baseline/vim/config.nix +++ b/home/modules/baseline/vim/config.nix @@ -62,7 +62,7 @@ in { mode = "n"; key = ""; - action = ":Neotree float git_status toggle"; + action = ":Git"; } (winMove "h") (winMove "j") @@ -140,6 +140,12 @@ in } // (if (lib.versionAtLeast lib.version "24.11") then { web-devicons.enable = true; } else { }); + userCommands = { + Ggr = { + command = "Ggrep! | cw | redraw!"; + nargs = "+"; + }; + }; extraConfigLua = builtins.replaceStrings [ "@git@" ] [ "${pkgs.git}/bin/git" ] (builtins.readFile ./extra.lua); extraConfigVim = builtins.readFile ./extra.vimrc; extraPlugins = with pkgs.vimPlugins; [