summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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() {