diff --git a/home/profile/default.nix b/home/profile/default.nix index 8db1d4f..b38defa 100644 --- a/home/profile/default.nix +++ b/home/profile/default.nix @@ -5,17 +5,19 @@ "${config.home.homeDirectory}/.local/bin" ]; - sessionVariables = { + sessionVariables = rec { HACK = "${config.home.homeDirectory}/hackin"; # TODO: remove this when neovim is installed. EDITOR = "nvim"; - VISUAL = "${config.home.sessionVariables.VISUAL}"; - SUDO_EDITOR = "${config.home.sessionVariables.VISUAL}"; + VISUAL = "${EDITOR}"; + SUDO_EDITOR = "${EDITOR}"; }; shellAliases = { c = "clear"; + e = "${config.home.sessionVariables.EDITOR}"; + v = "${config.home.sessionVariables.EDITOR}"; }; }; diff --git a/home/programs/fish.nix b/home/programs/fish.nix index 7b506b6..39cc6e8 100644 --- a/home/programs/fish.nix +++ b/home/programs/fish.nix @@ -29,5 +29,37 @@ src = autopair; } ]; + + shellInit = # fish + '' + set -g fish_key_bindings fish_vi_key_bindings + ''; + + shellAbbrs = { + cp = { + position = "command"; + expansion = "cp -iv"; + }; + + mkdir = { + position = "command"; + expansion = "mkdir -pv"; + }; + + mv = { + position = "command"; + expansion = "mv -iv"; + }; + + rm = { + position = "command"; + expansion = "rm -r"; + }; + + grep = { + position = "command"; + expansion = "grep --color=auto"; + }; + }; }; }