From c8fcd6d3d25eb9258c1b3396d7946b3fd29dda07 Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Sun, 29 Nov 2020 17:44:32 -0500 Subject: [PATCH] Added Linux vs Darwin differences for vim/nvim --- .local/dotfiles/aliases/gvim.zsh | 18 +++++++++++++----- .local/dotfiles/environment/core.zsh | 15 +++++++++++++-- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.local/dotfiles/aliases/gvim.zsh b/.local/dotfiles/aliases/gvim.zsh index 7204a13..1ab6378 100644 --- a/.local/dotfiles/aliases/gvim.zsh +++ b/.local/dotfiles/aliases/gvim.zsh @@ -1,6 +1,14 @@ -if whence -p nvim-gtk > /dev/null; then - alias vim=nvim-gtk -elif whence -p gvim > /dev/null; then - alias vim=gvim -fi +case `uname` in + Linux) + if whence -p nvim-gtk > /dev/null; then + alias vim=nvim-gtk + elif whence -p gvim > /dev/null; then + alias vim=gvim + fi + ;; + Darwin) + if whence -p nvim > /dev/null; then + alias vim=nvim + fi +esac diff --git a/.local/dotfiles/environment/core.zsh b/.local/dotfiles/environment/core.zsh index cc1382a..bfe7879 100644 --- a/.local/dotfiles/environment/core.zsh +++ b/.local/dotfiles/environment/core.zsh @@ -1,6 +1,17 @@ +case `uname` in + Linux) + EDITOR=vim + VISUAL=vim + ;; + Darwin) + EDITOR=nvim + VISUAL=nvim + ;; +esac + # Default Environment -export EDITOR=vim -export VISUAL=vim +export EDITOR +export VISUAL export PAGER=less export VIMINIT=":set runtimepath^=$HOME/.SpaceVim|:source $HOME/.SpaceVim/vimrc" export SPACEVIMDIR="$HOME/.SpaceVim.d/"