tweaks to vim paste and git

This commit is contained in:
Noah Masur 2022-09-13 23:09:03 -04:00
parent 5648cd29e7
commit 2c0cc201e9
3 changed files with 5 additions and 0 deletions

View File

@ -72,6 +72,7 @@
home-manager.useUserPackages = true;
# Allow specified unfree packages (identified elsewhere)
# Retrieves package object based on string name
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) config.unfreePackages;

View File

@ -75,3 +75,4 @@ key("n", "<A-CR>", ":noh<CR>", { silent = true }) --- Clear search in VimWiki
key("n", "Y", "y$") --- Copy to end of line
key("v", "<C-r>", "y<Esc>:%s/<C-r>+//gc<left><left><left>") --- Substitute selected
key("v", "D", "y'>gp") --- Duplicate selected
key("x", "<Leader>p", '"_dP') --- Paste but keep register

View File

@ -67,6 +67,9 @@ in {
cdg = "cd (git rev-parse --show-toplevel)";
};
# Required for fish commands
home.packages = with pkgs; [ fish fzf bat ];
programs.fish.functions = lib.mkIf (builtins.elem pkgs.fzf home-packages
&& builtins.elem pkgs.bat home-packages) {
git = { body = builtins.readFile ./fish/functions/git.fish; };