Skip to content

Instantly share code, notes, and snippets.

@limpid-kzonix
Created November 14, 2021 12:10
Show Gist options
  • Save limpid-kzonix/eb98b72878ef7108a61f6e6a22fba365 to your computer and use it in GitHub Desktop.
Save limpid-kzonix/eb98b72878ef7108a61f6e6a22fba365 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
/usr/bin/snap run nvim ${@}
CUSTOM_NVIM_PATH=${HOME}/.nvim.run.sh
sudo chmod +x "${CUSTOM_NVIM_PATH}"
set -u
sudo update-alternatives --install /usr/bin/ex ex "${CUSTOM_NVIM_PATH}" 110
sudo update-alternatives --install /usr/bin/vi vi "${CUSTOM_NVIM_PATH}" 110
sudo update-alternatives --install /usr/bin/view view "${CUSTOM_NVIM_PATH}" 110
sudo update-alternatives --install /usr/bin/vim vim "${CUSTOM_NVIM_PATH}" 110
sudo update-alternatives --install /usr/bin/vimdiff vimdiff "${CUSTOM_NVIM_PATH}" 110
sudo update-alternatives --set ex "${CUSTOM_NVIM_PATH}"
sudo update-alternatives --set vi "${CUSTOM_NVIM_PATH}"
sudo update-alternatives --set view "${CUSTOM_NVIM_PATH}"
sudo update-alternatives --set vim "${CUSTOM_NVIM_PATH}"
sudo update-alternatives --set vimdiff "${CUSTOM_NVIM_PATH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment