/vimfiles

My ~/.vim directory. All hail vim.

Primary LanguageVim Script

vimfiles

My ~/.vim directory. All hail vim.

Installation

Plugins are managed using the Pathogen plugin manager and tracked using git submodule . Use the --recursive option when cloning this repository to automatically download and install them.

git clone --recursive https://github.com/kwakwaversal/vimfiles.git ~/.vim

Set up a symbolic link to this repository's vimrc file if using an older version of vim. (Newer versions pick up the existence of the .vim folder and contained vimrc file.)

ln -s ~/.vim/vimrc ~/.vimrc

If a vim plugin has been added after you cloned this repository, you need to reinitialise the git submodules and update them.

git submodule update --init

The plugin coc.vim requires additional configuration. The below is entered directly from within vim itself.

:call coc#util#install()
:CocInstall coc-tsserver coc-eslint coc-json coc-prettier

Updating vim

Update/install the latest version of vim (optionally with clipboard support).

apt-get install libx11-dev libxt-dev libperl-dev ncurses-dev python python-dev
git clone --depth 1 https://github.com/vim/vim
# python3
./configure --disable-gui --enable-perlinterp --enable-python3interp=yes --with-features=huge --with-compiledby=inside --with-x
# python2
./configure --disable-gui --enable-perlinterp --enable-pythoninterp=yes --with-features=huge --with-compiledby=inside --with-x
make -j8
make install

Alternatively see https://github.com/jjangsangy/Dotfiles/wiki/Debian-Vim for more complete instructions.

Environment

My environment consists of Terminator, using the Powerline font Liberation Mono for Powerline.

Vim plugins

Pathogen is used as the plugin manager of choice.

Removed

Adding a new plugin

The Vim plugins are managed using git submodule.

git submodule add https://github.com/vim-perl/vim-perl.git bundle/vim-perl

Initializing plugins

When using these vimfiles from multiple machines, git submodules might be added in a commit from another machine so might need to be initialized.

git submodule init
git submodule update

Updating plugins

In the master branch, recursively update all plugins to the latest version.

git submodule update --init --recursive
git submodule foreach --recursive git fetch
git submodule foreach git pull --ff-only origin master

Resetting plugins

If you've updated some plugins and they're causing issues or you don't want to commit the updated version you can reset them:

git submodule update --init
git submodule update --init vim-ultisnips

Removing plugins

git submodule deinit -f -- bundle/vim-powerline
git rm --cached bundle/vim-powerline

See [https://stackoverflow.com/questions/10168449/git-update-submodule-recursive] for more information.

References