summaryrefslogtreecommitdiff
path: root/lib/common.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-12-28 14:23:39 -0500
committerBen Sima <ben@bsima.me>2020-12-28 14:23:39 -0500
commit7692fb9dc9b4f0277198f346303bff7eda5660d1 (patch)
tree11088c686f228aeb2ded802383929c3ff2565180 /lib/common.nix
parent1fa980d2fe7a2e016b7635d070d4ba3c5dc60394 (diff)
neovim->vim and fkill alias
Diffstat (limited to 'lib/common.nix')
-rw-r--r--lib/common.nix22
1 files changed, 15 insertions, 7 deletions
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() {