From 7692fb9dc9b4f0277198f346303bff7eda5660d1 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 28 Dec 2020 14:23:39 -0500 Subject: neovim->vim and fkill alias --- lib/common.nix | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'lib/common.nix') diff --git a/lib/common.nix b/lib/common.nix index 64d0829..fa9c955 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -157,11 +157,11 @@ in enable = true; }; - neovim = { + vim = { enable = true; - vimAlias = true; - viAlias = true; - vimdiffAlias = true; + #vimAlias = true; + #viAlias = true; + #vimdiffAlias = true; plugins = with pkgs.vimPlugins; [ editorconfig-vim vim-sensible @@ -169,6 +169,7 @@ in vim-sexp-mappings-for-regular-people # vim-ripgrep # not in nixpkgs :( rainbow_parentheses + vim-plug # just in case ]; extraConfig = builtins.readFile ./vimrc; }; @@ -192,15 +193,22 @@ in done cd "$P" } - function ff() { - find . -iname "*$@*" -not -path "*.git*" - } function regex { gawk 'match($0,/'$1'/, ary) {print ary['\$\{2:-'0'}']}'; } # my prompt, after much chagrin export PS1="\n\[\e[34m\][\u@\h:\w]\[\e[m\] \$(date +%Y.%m.%d..%H.%M) \$(if [ \$? == 0 ]; then true; else echo \(\$?\); fi) \n$ " + # kill a process with fzf + fkill() { + local pid + pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}') + + if [ "x$pid" != "x" ] + then + echo $pid | xargs kill -9 + fi + } # https://gist.github.com/junegunn/8b572b8d4b5eddd8b85e5f4d40f17236 is_in_git_repo() { -- cgit v1.2.3