Improved neovim installation
This commit is contained in:
parent
a7f48afa62
commit
d5e12978bb
1 changed files with 26 additions and 12 deletions
|
@ -1,24 +1,38 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo " - Installing Neovim - "
|
echo "🤔 Checking for Neovim installation..."
|
||||||
sudo apt-get install software-properties-common
|
if nvim -v; then
|
||||||
sudo apt-get install python-software-properties
|
echo "🥰 Neovim is already installed"
|
||||||
sudo add-apt-repository ppa:neovim-ppa/stable
|
else
|
||||||
sudo apt-get update
|
echo "🤩 Installing Neovim"
|
||||||
sudo apt-get install neovim
|
sudo apt-get install software-properties-common
|
||||||
sudo apt-get install python-dev python-pip python3-dev python3-pip
|
sudo apt-get install python-software-properties
|
||||||
|
sudo add-apt-repository ppa:neovim-ppa/stable
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install neovim
|
||||||
|
sudo apt-get install python-dev python-pip python3-dev python3-pip
|
||||||
|
echo "👍 Neovim installed"
|
||||||
|
fi
|
||||||
|
|
||||||
echo " - Setting Neovim as Default Editor - "
|
echo "🦄 Setting Neovim as default editor"
|
||||||
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60
|
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60
|
||||||
sudo update-alternatives --config vi
|
sudo update-alternatives --config vi
|
||||||
sudo update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60
|
sudo update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60
|
||||||
sudo update-alternatives --config vim
|
sudo update-alternatives --config vim
|
||||||
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60
|
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60
|
||||||
sudo update-alternatives --config editor
|
sudo update-alternatives --config editor
|
||||||
|
echo "👍 Neovim set as default editor"
|
||||||
|
|
||||||
echo " - Symlinking Neovim Conf - "
|
echo "🦄 Symlinking Neovim configuration"
|
||||||
rm ~/.config/nvim/init.vim
|
rm ~/.config/nvim/init.vim
|
||||||
ln -s ~/dotfiles/nvim/init.vim ~/.config/nvim/init.vim
|
ln -s ~/dotfiles/nvim/init.vim ~/.config/nvim/init.vim
|
||||||
|
echo "👍 Symlinked Neovim configuration"
|
||||||
|
|
||||||
echo " - Installing vim-plug - "
|
echo "🤔 Checking for vim-plug"
|
||||||
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
|
if [ -f ~/.local/share/nvim/site/autoload/plug.vim ]; then
|
||||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
echo "🥰 vim-plug is already installed"
|
||||||
|
else
|
||||||
|
echo "🤩 Installing vim-plug"
|
||||||
|
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
|
||||||
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
echo "👍 vim-plug installed"
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue