diff --git a/dotfiles/zsh.nix b/dotfiles/zsh.nix index 24ca442..99a051a 100644 --- a/dotfiles/zsh.nix +++ b/dotfiles/zsh.nix @@ -7,7 +7,7 @@ let ./zsh/jetpack.zsh ./zsh/jump.zsh ./zsh/kill-process.zsh - ./zsh/neovim.zsh + ./zsh/find-and-edit.zsh ./zsh/nix.zsh ./zsh/nixify.sh ./zsh/root.zsh @@ -15,7 +15,9 @@ let ./zsh/scripts.zsh ]; - extraInitExtra = builtins.foldl' (soFar: new: soFar + "\n" + builtins.readFile new) "" extras; + extraInitExtra = + builtins.foldl' (soFar: new: soFar + "\n" + builtins.readFile new) "" + extras; in { home.packages = [ # for shell autocorrections diff --git a/dotfiles/zsh/neovim.zsh b/dotfiles/zsh/find-and-edit.zsh similarity index 83% rename from dotfiles/zsh/neovim.zsh rename to dotfiles/zsh/find-and-edit.zsh index 730a996..9459204 100644 --- a/dotfiles/zsh/neovim.zsh +++ b/dotfiles/zsh/find-and-edit.zsh @@ -1,4 +1,4 @@ -## neovim shortcuts +## finding files quickly find_and_edit() { if test -d .git; then @@ -9,7 +9,7 @@ find_and_edit() { files="$(fzf --preview='bat --color=always --paging=never --style=changes {}' --select-1 --multi --query="$@" <<< "$SOURCE")" if [[ "$?" != "0" ]]; then return 1; fi - vim $files + $EDITOR $files } -alias v=find_and_edit +alias e=find_and_edit