A tool to manage your favorite Vim plugins


Keywords
vim, vim-plugin-manager
License
MIT
Install
gem install vim-flavor -v 4.0.2

Documentation

vim-flavor, a tool to manage your favorite Vim plugins

CI Maintainability

Getting started

Create Flavorfile

This file contains a set of declarations about what Vim plugins you want to install. For example:

# Install a Vim plugin from `https://github.com/kana/vim-textobj-indent`.
#
# Note that kana/vim-textobj-indent requires kana/vim-textobj-user.
# Such dependencies are automatically installed if the former plugin
# declares its dependencies with Flavorfile.
flavor 'kana/vim-textobj-indent'

# Install a Vim plugin from `https://github.com/vim-scripts/fakeclip`.
flavor 'fakeclip'

# Install a Vim plugin from the specified URI.
flavor 'https://github.com/kana/vim-altr.git'

# You can also specify which version of Vim plugin should be installed.
# For example:
flavor 'kana/vim-smartword', '~> 0.1'    # 0.1 or later, but older than 0.2
flavor 'kana/vim-smartchr',  '~> 0.2.4'  # 0.2.4 or later, but older than 0.3.0
flavor 'kana/vim-smarttill', '>= 0.3.6'  # 0.3.6 or later

# vim-flavor, by design, requires Vim plugins to follow semantic versioning
# and to create version tags (like `v1.2.3`) in their repositories.
#
# For repositories without versioning, branches can be specified.
flavor 'chriskempson/base16-vim', branch: 'master'

Install Vim plugins (for the first time)

Run the following command:

vim-flavor install

This command does the following stuffs:

  1. Fetches Vim plugins declared in the Flavorfile.
  2. Creates Flavorfile.lock file. It contains information about what versions of plugins to be installed.
  3. Copies the fetched plugins into ~/.vim/pack/flavors/start, then updates help tags for each plugin.

It's recommended to commit Flavorfile and Flavorfile.lock after installation.

git add Flavorfile Flavorfile.lock
git commit -m 'Use vim-flavor to manage my favorite Vim plugins'

Install Vim plugins (from another machine)

Suppose that you work with several PCs and/or servers, and you want to use the same configuration, including Vim plugins, on all of them.

Firstly, let's synchronize your configuration files:

cd ~/your/dotfiles/repository
git pull

Now you have the same Flavorfile and Flavorfile.lock created by the previous step.

Then run the following command:

vim-flavor install

This time vim-flavor installs the same versions of Vim plugins as recorded in Flavorfile.lock, even if newer versions are available.

Update Vim plugins

To update Vim plugins, run the following command:

vim-flavor update

This is similar to vim-flavor install, but vim-flavor tries checking and installing newer versions of Vim plugins.

This command usually updates Flavorfile.lock. So that you have to commit it again.

git add Flavorfile.lock
git commit -m 'Update Vim plugins'

References

See features/ directory for the details. The same documents are available also on relish.

Changelog

See CHANGELOG.md.

License

vim-flavor is released under the terms of MIT license. See the LICENSE file for the details.

Development

Set up

  1. Install rbenv.

  2. Run the following commands in your clone of vim-flavor repository:

    git submodule update --init
    rbenv install
    bundle install

Run tests

rake test

Author