Giter Club home page Giter Club logo

vim-flavor's Introduction

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

vim-flavor's People

Contributors

kana avatar dependabot[bot] avatar peeja avatar alexgenco avatar janko avatar pengwynn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.