From 3e1f713bc341064fd5d6ddd04650ae1f77b9f43e Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Fri, 12 May 2023 12:35:09 -0700 Subject: [PATCH] home: fix Neovim autosave --- hosts/home.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hosts/home.nix b/hosts/home.nix index a09601b..f228564 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -96,7 +96,6 @@ in gC = "g clone"; goops = "g reset --soft HEAD^"; - v = "nvim"; r = "ranger"; rm = "trash-put"; emacs = "emacsclient -nw"; @@ -105,6 +104,14 @@ in clear = "printf '\\E[H\\E[3J'"; }; bashrcExtra = '' + function v { + if [[ $# -eq 0 ]]; then + nvim ~/UNTITLED.md + else + nvim $1 + fi + } + # Modify killall for wrapped applications, e.g. firefox # killall firefox -> killall firefox || killall .firefox-wrapped function killall {