Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🍺 Revamped install script; Color picker and toggle plugins added
- Loading branch information
Showing
4 changed files
with
119 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/plugged | ||
plugged/ | ||
env/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,45 @@ | ||
#!/bin/bash | ||
|
||
# Install nvim (and its dependencies: pip3, git) and ctags (for tagbar) | ||
echo '[*] App installing Neovim and its dependencies (Python 3 and git), and dependencies for tagbar (exuberant-ctags) ...' | ||
sudo apt install neovim python3-pip git exuberant-ctags -y &&\ | ||
# Make config directory for Neovim's init.vim | ||
echo '[*] Preparing Neovim config directory ...' &&\ | ||
mkdir -p ~/.config/nvim &&\ | ||
|
||
# Install pip modules for Neovim | ||
echo '[*] Pip installing Neovim (for Python plugin support) and libraries for async autocompletion support (jedi, psutil, setproctitle) ...' | ||
pip3 install --user neovim jedi psutil setproctitle &&\ | ||
# Install nvim (and its dependencies: pip3, git), Python 3 and ctags (for tagbar) | ||
echo '[*] App installing Neovim and its dependencies (Python 3 and git), and dependencies for tagbar (exuberant-ctags) ...' &&\ | ||
sudo apt install neovim python3 python3-pip git exuberant-ctags -y &&\ | ||
|
||
# Install vim-plug plugin manager | ||
echo '[*] Downloading vim-plug, the best minimalistic vim plugin manager ...' | ||
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim &&\ | ||
# Install virtualenv to containerize dependencies | ||
echo '[*] Pip installing virtualenv to containerize Neovim dependencies (instead of installing them onto your system) ...' &&\ | ||
pip3 install --user virtualenv &&\ | ||
python3 -m virtualenv ~/.config/nvim/env &&\ | ||
|
||
# Make config directory for Neovim's init.vim | ||
echo '[*] Preparing Neovim config directory ...' | ||
mkdir -p ~/.config/nvim &&\ | ||
# Install pip modules for Neovim within the virtual environment created | ||
echo '[*] Activating virtualenv and pip installing Neovim (for Python plugin support) and libraries for async autocompletion support (jedi, psutil, setproctitle) ...' &&\ | ||
source ~/.config/nvim/env/bin/activate &&\ | ||
pip install neovim jedi psutil setproctitle &&\ | ||
deactivate &&\ | ||
|
||
# Soft link the init.vim in current working directory to nvim's config location. Or simply `cp init.vim ~/.config/nvim/` | ||
echo "[*] Soft-linking $(readlink -f init.vim) -> $(readlink -f ~/.config/nvim/init.vim)" | ||
ln -sf $(readlink -f init.vim) ~/.config/nvim/. &&\ | ||
# Install vim-plug plugin manager | ||
echo '[*] Downloading vim-plug, the best minimalistic vim plugin manager ...' &&\ | ||
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim &&\ | ||
|
||
# (Optional but recommended) Install a nerd font for icons and a beautiful airline bar (https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts) (I'll be using Roboto Mono for Powerline) | ||
echo "[*] Downloading patch font into ~/.local/share/fonts ..." | ||
echo "[*] Downloading patch font into ~/.local/share/fonts ..." &&\ | ||
curl -fLo ~/.local/share/fonts/Roboto\ Mono\ Nerd\ Font\ Complete.ttf --create-dirs https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/RobotoMono/complete/Roboto%20Mono%20Nerd%20Font%20Complete.ttf &&\ | ||
|
||
# (Optional) Alias vim -> nvim | ||
echo '[*] Aliasing vim -> nvim, remember to source ~/.bashrc ...' | ||
echo '[*] Aliasing vim -> nvim, remember to source ~/.bashrc ...' &&\ | ||
echo "alias vim='nvim'" >> ~/.bashrc &&\ | ||
|
||
# Enter Neovim and install plugins | ||
echo '[*] Running :PlugInstall within nvim.' | ||
nvim -c ':PlugInstall' | ||
echo "[+] Done, enjoy Neovim! Don't forget to run :PlugInstall within nvim." | ||
# Enter Neovim and install plugins using a temporary init.vim, which avoids warnings about missing colorschemes, functions, etc | ||
echo -e '[*] Running :PlugInstall within nvim ...' &&\ | ||
sed '/call plug#end/q' init.vim > ~/.config/nvim/init.vim &&\ | ||
nvim -c ':PlugInstall' -c ':qall' &&\ | ||
rm ~/.config/nvim/init.vim &&\ | ||
|
||
# Copy init.vim in current working directory to nvim's config location ...` | ||
echo '[*] Copying init.vim -> ~/.config/nvim/init.vim' &&\ | ||
cp init.vim ~/.config/nvim/ &&\ | ||
|
||
echo -e "[+] Done, welcome to \033[1m\033[92mNeoVim\033[0m! Try it by running: nvim/vim. Want to customize it? Modify ~/.config/nvim/init.vim" | ||
|