From 31a0b52f4f91756612e7c6c570e0f53e91e582d0 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sun, 1 Jan 2023 21:05:32 -0500 Subject: add some pkgs and readline config Change-Id: I3f40661ebbe5b5d1aa95fb5241995e7596f94034 --- lib/common.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'lib/common.nix') diff --git a/lib/common.nix b/lib/common.nix index ff7edd6..7d5f520 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -70,6 +70,32 @@ in { enable = true; }; + readline = { + enable = true; + variables = { + keyseq-timeout = 1200; + colored-stats = true; + colored-completion-prefix = true; + expand-tilde = true; + }; + bindings = { + # wrap a command in '$(...| fzf)' + "\\C-xf" = ''"\C-e | fzf)\C-a(\C-a$\C-b\C-a"''; + "\\e\\C-f" = "dump-functions"; # help + "\\e\\C-o" = "dabbrev-expand"; # expand + "\\e\\C-v" = "dump-variables"; # help + "\\em" = "beginning-of-line"; + # emacs-like history navigation + "\\en" = "next-history"; + "\\ep" = "previous-history"; + }; + extraConfig = '' + $if Guile + "\C-o": "()\C-b" + $endif + ''; + }; + fzf = { enable = true; enableBashIntegration = true; -- cgit v1.2.3