Install/Update vim packs
There are heaps of ways to make vim even a better editor, when adding packs created by other vim lovers. Packs can also be referred as plug-ins.
Some people manage these packs/plug-ins using pathogen or Vundle. I personally rather use the native approach, which seems to have been added in Vim 8. man page
In very short, we just need to clone the pack/plug-in git repository into the path ~/.vim/pack/plugins/start/<pack name>
. In case you keep your vim configuration version controlled in git, you can add your packs as submodules. Then, your setup will stick on the latest version when you installed.
Examples
Installing a pack:
git submodule add https://github.com/duderamos/foo.git pack/plugins/start/foo
git commit -m "Install foo"
Remove a pack:
cd ~/.vim
git submodule deinit pack/plugins/start/foo
git rm -r pack/plugins/start/foo
git commit -m "Remove foo"
rm -r .git/modules/pack/plugins/start/foo
Update all packs:
git submodule update --recursive --remote --init
git commit pack -m "Update packs"
References:
- Using git-submodules to version-control Vim plugins Forked from https://gist.github.com/manasthakur/d4dc9a610884c60d944a4dd97f0b3560
- Vim 8 package management