Greetings!
Recently the package `ex-vi-compat` was introduced, which conflicts
with, and replaces `vi`.
This PKGBUILD installs `vim` onto the system, and symlinks a bunch of
commands to `vim`.
However, I use `neovim`, and it seems a bit superfluous to me to install
`vim`, when `neovim` can do all that `vim` can do in this regard.
Is there any way to perhaps check if either `vim` or `neovim` is already
installed on the system, and then use either one of them in the symlink?
Something like:
```sh
package() {
local cmd
local vimcmd
# Determine which editor to use
if command -v nvim &>/dev/null; then
vimcmd="nvim"
elif command -v vim &>/dev/null; then
vimcmd="vim"
else
error "Neither neovim nor vim found"
return 1
fi
install -vDm 755 vi.sh "$pkgdir/usr/bin/vi"
for cmd in {edit,ex,vedit,view} ; do
ln -sv "$vimcmd" "$pkgdir/usr/bin/$cmd"
done
```
Alternatively, perhaps a few changes in `vi.sh` about which editor to
invoke?
Kind regards,
- Edmund
--
Edmund Lodewijks <[email protected]>
TZ: UCT+2 / GMT+2