Skip to content

Instantly share code, notes, and snippets.

@lvaylet
Last active August 6, 2021 18:32
Show Gist options
  • Save lvaylet/d688bd5e65346576a722e5e94c5df2be to your computer and use it in GitHub Desktop.
Save lvaylet/d688bd5e65346576a722e5e94c5df2be to your computer and use it in GitHub Desktop.
Install Vim and Neovim with Distrotube's config

05 - Vim

Download Derek's config file with:

curl -fLo ~/.vimrc --create-dirs https://gitlab.com/dwt1/dotfiles/-/raw/master/.vimrc

Install vim-plug (for plugin management) with:

curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Run Vim and install plugins with :PlugInstall. Exit and restart for changes to take effect. Alternatively, run vim +'PlugInstall --sync' +qa from the command line or a script to automate things further. See Run PlugInstall non-interactively from command line for more details and explanations on how this command works.

Neovim

It is possible to install Neovim alongside Vim with:

sudo apt install -y neovim

and reuse the Vim config files by adding these lines to ~/.config/nvim/init.vim, as described in Transitioning from Vim:

mkdir -p ~/.config/nvim
cat <<EOT >> ~/.config/nvim/init.vim
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath=&runtimepath
source ~/.vimrc
EOT

Finally, run Neovim with nvim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment