mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2026-01-29 09:23:02 +01:00
Since git core.editor was set in the initial commit, I suspect I wasn't aware of $EDITOR in the environment. So it's safe to delete git/gitconfig's core.editor and take it from $EDITOR by default, which actually checks if nvim is installed. for git's diff.tool and merge.tool, I don't see a possibility to have a conditional switch and fallback to vim. I don't expect to work on another workstation without neovim.
10 lines
167 B
Bash
Executable file
10 lines
167 B
Bash
Executable file
#!/bin/sh
|
|
|
|
if [ -n "$(type nvim 2>/dev/null)" ]; then
|
|
export EDITOR=nvim
|
|
export VISUAL=nvim
|
|
else
|
|
export EDITOR=vim
|
|
export VISUAL=vim
|
|
fi
|
|
export BROWSER=firefox
|