~bpv/pm

Stupidly Simple Vim/NeoVim Plugin Manager

71ffbbc Add ListPlugins command and bump to 0.7.0

~bpv pushed to ~bpv/pm git

a month ago

d817dd3 Pull documentation when upgrading pm

~bpv pushed to ~bpv/pm git

8 months ago

#pm

A stupidly simple Vim/NeoVim plugin manager

#Why?

Vim and NeoVim now have plugin management builtin so I have no need for a "bloated" plugin manager that is thousands of lines long. All I need is a Vim/NeoVim script that will download and update my plugins.

#Install

Requirements:

#Vim

curl -fLo ~/.vim/plugin/pm.vim --create-dirs https://git.sr.ht/~bpv/pm/blob/master/pm.vim
#Documentation for Vim
curl -fLo ~/.vim/doc/pm.txt --create-dirs https://git.sr.ht/~bpv/pm/blob/master/pm.txt
vim -c "helptags ~/.vim/doc | q"

#NeoVim

sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/plugin/pm.vim --create-dirs https://git.sr.ht/~bpv/pm/blob/master/pm.vim'
#Documentation for NeoVim
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/doc/pm.txt --create-dirs https://git.sr.ht/~bpv/pm/blob/master/pm.txt'
nvim -c "lua dir = os.getenv('XDG_DATA_HOME') or os.getenv('HOME') .. '/.local/share' ; vim.cmd('helptags ' .. dir .. '/nvim/site/doc') ; vim.cmd(':q!')"

#Usage

Create plugin list

#Example

In your .vim file (Vim) or init.vim (NeoVim) file create a list variable named g:plugins. This is where you will list the Git urls of all the plugins that you want to download.

let g:plugins = ["https://github.com/ap/vim-css-color.git", "https://git.sr.ht/~k1nkreet/gemivim"]

#Commands

  • :ClonePlugin "url": Downloads plugin from specified url but does not add it to g:plugins
  • :DownloadPlugins: Downloads all plugins from their Git repos
  • :ListPlugins: Lists currently installed plugins
  • :PurgePlugins: Removes all plugins not defined in g:plugins
  • :UpdatePlugins: Updates all installed plugins
  • :UpdatePM: Downloads and updates pm