Skip to main content

command-line (n)vim package manager

Project description

Build Status Coverage Status Pypi

A command-line tool to manage my vim plugins using the built-in package feature of vim8. (see :help packages)

install list upgrade

Table of contents:

Dependencies

  • git

  • python 3.6

Installation

I like to install python command line programs in their own virtual environment to not clutter the system wide package directory. pipsi make it very conveniant to do so by automatically creating the venv and symlinking scripts to ~/.local/bin. If you don’t use pipsi, you’re missing out. Here are installation instructions.

Simply run:

$ pipsi install vim-pck

Alternatively, with pip:

$ pip install vim-pck

How to use

Configuration file

The main configuration file where the vim packages are specified. It’s default location follow the XDG specification that is $XDG_HOME_CONFIG/vimpck/config or ~/.config/vimpck/config if XDG_HOME_CONFIG is not set.

[SETTING]
    # The built in package directory. See :help packages
    pack_path=~/.vim/pack
    # pack_path= ~/.local/share/nvim/site/pack for neovim

[REPOSITORY]
    [[https://github.com/tpope/vim-commentary]]
        package = common
        type = start
        freeze = True # Don't update vim-commentary when launching vimpck upgrade

    [[https://github.com/tpope/vim-dispatch]]
    # default location pack_path/vimpck/start/vim-dispatch

    [[https://github.com/mustache/vim-mustache-handlebars]]
        package = filetype
        type = start

    [[https://github.com/altercation/vim-colors-solarized]]
        package = colors
        type = start

Then run vimpck install to clone each remote repository in the correct package location. For exemple, vim-commentary –> ~/.vim/pack/common/start/vim-commentary

For neovim the package path should be set to ~/.local/share/nvim/site/pack

Option

default value

pack_path

~/.vim/pack

package

vimpck

type

start

freeze

False

Usage

To use it (see vimpck --help):

  • $ vimpck install : install plugins from the configuration file

  • $ vimpck ls : list all plugins

  • $ vimpck ls --start : list plugins that are automatically loaded

  • $ vimpck ls --opt : list plugins that have to be loaded manually

  • $ vimpck upgrade : update all plugins that are not freezed

  • $ vimpck upgrade <plug>... : only update <plug> plugin. The plugin have to be specified using the following pattern package/type/plugin. You can easily complete the <plug> with the zsh completion script.

  • vimpck rm <plug>... : remove one or more <plug>. Support zsh completion.

  • vimpck rm -r <plug>... : remove one or more <plug> and also remove the corresponding section from the configuration file.

  • vimpck clean : remove unused plugins

Environment variable

  • VIMPCKRC: override default configuration location (xdg standard)

Example : export VIMPCKRC=/path/to/conf/name

Completion

A zsh completion function is provided in the completion folder of this repository.

To use it copy _vimpck somewhere in the $fpath environment variable of zsh and make sure the completion module of zsh is loaded by putting these following lines in your .zshrc:

autoload -U compinit
compinit

Note

License

MIT license, see the LICENSE file. You can use obfuscator in open source projects and commercial products.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vim-pck-0.1.0.tar.gz (153.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vim_pck-0.1.0-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file vim-pck-0.1.0.tar.gz.

File metadata

  • Download URL: vim-pck-0.1.0.tar.gz
  • Upload date:
  • Size: 153.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vim-pck-0.1.0.tar.gz
Algorithm Hash digest
SHA256 036e658e89e5cd38a799405c48661b17dfd60ba3183065721ad747f65fe2df54
MD5 4ee075ac77a805b1df51faede4e1ceba
BLAKE2b-256 29e16da65c43c40c30d85e95955f7cf696f533aaa4caf727a371a46ed8998752

See more details on using hashes here.

File details

Details for the file vim_pck-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for vim_pck-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8653b03b9f3ff55aada3aa249df6a570628fc9269d7b2d06fd508b1d438cac4b
MD5 266406117ee56e654be40aded0e96c3b
BLAKE2b-256 b28c13319c0d2d4785356c13562cabd1ef33f5227e47e3c12c2b1aca208ae645

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page