From aee9a724631bb67c38da44931275a3d28a4c007e Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 14 Dec 2020 13:07:46 -0500 Subject: vim colors and fzf integration --- lib/common.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/common.nix') diff --git a/lib/common.nix b/lib/common.nix index 0975cfd..64d0829 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -22,6 +22,7 @@ in FD_OPTIONS = "--follow --exclude .git"; BAT_PAGER = "less -R"; + FZF_DEFAULT_OPTS = "--bind='?:toggle-preview'"; FZF_DEFAULT_COMMAND = "git ls-files --cached --others --exclude-standard | fd --type f --type l $FD_OPTIONS"; FZF_CTRL_T_COMMAND = "fd $FD_OPTIONS"; FZF_ALT_C_COMMAND = "fd --type d $FD_OPTIONS"; @@ -291,7 +292,7 @@ in tdate = "date +%Y.%m.%d..%H.%M"; ttime = "date +%H.%M"; typeless = "history | tail -n 20000 | sed 's/.* //' | sort | uniq -c | sort -g | tail -n 100"; - v = "vim $(fzf)"; + v = "vim $(fzf --preview='bat --color=always {}' --preview-window right:70%)"; "v." = "vim ."; }; }; -- cgit v1.2.3