From 1a47f361476fb3f2e188f6a95a1c1e10b8e94df8 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Mon, 4 Mar 2024 11:56:56 -0600 Subject: [PATCH] refactor(zsh): better `e` function to launch $EDITOR --- dots/.config/zsh/config/profile/profile/functions.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dots/.config/zsh/config/profile/profile/functions.zsh b/dots/.config/zsh/config/profile/profile/functions.zsh index 7e688146..28b1ce5d 100644 --- a/dots/.config/zsh/config/profile/profile/functions.zsh +++ b/dots/.config/zsh/config/profile/profile/functions.zsh @@ -185,5 +185,9 @@ preexec() { # Editor with single letter e() { - eval "${EDITOR} ${@}" + if [[ "${EDITOR}" =~ "neovide*" ]]; then + neovide "${@}" + else + eval "${EDITOR} ${@}" + fi }