-
Single file installation
-
You need to just download a single file and put it.
-
-
First-class Lua support
-
This plugin is not written in Lua but we provide a Lua API.
-
-
Fancy User Interface
-
You can see a progress of installation with a graphical progress bar.
-
-
pack/*/start
-free installation-
You can install plugins without
pack/*/start
directory.
-
-
Git-free installation
-
You can optionally install plugins without git.
-
The installation is very simple. You just need to download a single file and put it on the runtimepath.
https://raw.githubusercontent.com/tani/vim-jetpack/master/plugin/jetpack.vim
The following is an example of installation with cURL command.
Vim for Linux and macOS
curl -fLo ~/.vim/pack/jetpack/opt/vim-jetpack/plugin/jetpack.vim --create-dirs https://raw.githubusercontent.com/tani/vim-jetpack/master/plugin/jetpack.vim
Neovim for Linux and macOS
curl -fLo ~/.local/share/nvim/site/pack/jetpack/opt/vim-jetpack/plugin/jetpack.vim --create-dirs https://raw.githubusercontent.com/tani/vim-jetpack/master/plugin/jetpack.vim
Vim for Windows
curl -fLo %USERPROFILE%\vimfiles\pack\jetpack\opt\vim-jetpack\plugin\jetpack.vim --create-dirs https://raw.githubusercontent.com/tani/vim-jetpack/master/plugin/jetpack.vim
Neovim for Windows
curl -fLo %USERPROFILE%\AppData\Local\nvim-data\site\pack\jetpack\opt\vim-jetpack\plugin\jetpack.vim --create-dirs https://raw.githubusercontent.com/tani/vim-jetpack/master/plugin/jetpack.vim
Tip
|
There exists an option for automatic installation on startup. Fore more details, see Configuration Snippets. |
Jetpack was initially implemented as a successor of vim-plug. Nowadays, we also provide compatibility layers for other plugin managers, dein.vim, packer.nvim.nvim, and paq.nvim.nvim. You can use Jetpack as a drop-in replacement of them. In personal opinion, vim-plug style is the most stable and easy to use.
packadd vim-jetpack
call jetpack#begin()
Jetpack 'tani/vim-jetpack', {'opt': 1} "bootstrap
Jetpack 'https://github.com/dense-analysis/ale'
Jetpack 'junegunn/fzf.vim'
Jetpack 'junegunn/fzf', { 'do': {-> fzf#install()} }
Jetpack 'neoclide/coc.nvim', { 'branch': 'release' }
Jetpack 'neoclide/coc.nvim', { 'branch': 'master', 'do': 'yarn install --frozen-lockfile' }
Jetpack 'vlime/vlime', { 'rtp': 'vim' }
Jetpack 'dracula/vim', { 'as': 'dracula' }
Jetpack 'tpope/vim-fireplace', { 'for': 'clojure' }
call jetpack#end()
packadd vim-jetpack
call jetpack#begin()
call jetpack#load_toml('path/to/dein.toml')
call jetpack#add('tani/vim-jetpack', {'opt': 1}) "bootstrap
call jetpack#add('https://github.com/dense-analysis/ale')
call jetpack#add('junegunn/fzf.vim')
call jetpack#add('junegunn/fzf', { 'build': './install' })
call jetpack#add('neoclide/coc.nvim', { 'branch': 'release' })
call jetpack#add('neoclide/coc.nvim', { 'branch': 'master', 'build': 'yarn install --frozen-lockfile' })
call jetpack#add('vlime/vlime', { 'rtp': 'vim' })
call jetpack#add('dracula/vim', { 'name': 'dracula' })
call jetpack#add('tpope/vim-fireplace', { 'on_ft': 'clojure' })
call jetpack#end()
[[plugins]]
repo = 'tani/vim-jetpack'
[[plugins]]
repo = 'tpope/vim-fugitive'
on_cmd = 'Git'
hook_source = '''
let g:fugitive_no_mappings = 1
'''
hook_post_source = '''
echom 'fugitive is loaded'
'''
-- Packer.nvim v1
vim.cmd('packadd vim-jetpack')
require('jetpack.packer').startup(function(use)
use { 'tani/vim-jetpack' } -- bootstrap
use 'https://github.com/dense-analysis/ale'
use 'junegunn/fzf.vim'
use {'junegunn/fzf', run = 'call fzf#install()' }
use {'neoclide/coc.nvim', branch = 'release'}
use {'neoclide/coc.nvim', branch = 'master', run = 'yarn install --frozen-lockfile'}
use {'vlime/vlime', rtp = 'vim' }
use {'dracula/vim', as = 'dracula' }
use {'tpope/vim-fireplace', ft = 'clojure' },
use {'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate',
config = function()
require'nvim-treesitter.configs'.setup {
ensure_installed = 'maintained',
highlight = { enable = true }
}
end
}
end)
-- Packer.nvim v2
vim.cmd('packadd vim-jetpack')
require('jetpack.packer').add {
{'tani/vim-jetpack'}, -- bootstrap
'https://github.com/dense-analysis/ale',
'junegunn/fzf.vim',
{'junegunn/fzf', run = 'call fzf#install()' },
{'neoclide/coc.nvim', branch = 'release'},
{'neoclide/coc.nvim', branch = 'master', run = 'yarn install --frozen-lockfile'},
{'vlime/vlime', rtp = 'vim' },
{'dracula/vim', as = 'dracula' },
{'tpope/vim-fireplace', ft = 'clojure' },
{'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate',
config = function()
require'nvim-treesitter.configs'.setup {
ensure_installed = 'maintained',
highlight = { enable = true }
}
end
}
}
-- Paq.nvim
vim.cmd('packadd vim-jetpack')
require('jetpack.paq') {
{'tani/vim-jetpack'}, -- bootstrap
'https://github.com/dense-analysis/ale',
'junegunn/fzf.vim',
{'junegunn/fzf', run = './install' },
{'neoclide/coc.nvim', branch = 'release'},
{'neoclide/coc.nvim', branch = 'master', run = 'yarn install --frozen-lockfile'},
{'dracula/vim', as = 'dracula' },
}
We provide configuration variables to change the internal behaviors: copying files, downloading plugins.
g:jetpack_download_method
-
Jetpack downloads plugins with git by default. Further, Jetpack can download plugins with git, cURL, and wget This is useful for environments without git. Non-git options are not recommended because they are slower than git as jeptack downloads the whole repository as a tar archive.
Tip
|
iVim does not have git command.
We recommend the following configuration to avoid the external commands except cURL. let g:jetpack_download_method = 'curl' |
Caution
|
You might be able to use another configuration parameters,
you can use on_cmd in vim-plug style for example,
but it might be going to be removed in the future.
Thus, we recommend you not to use unlisted configuration parameters.
|
You can pass the configuration parameters to Jetpack
command as follows.
Jetpack 'tani/vim-jetpack', { 'as': 'jetpack' }
The following is a list of configuration parameters for vim-plug style.
Parameter | Type | Description |
---|---|---|
|
|
On-demand loading plugins by commands, keymaps. |
|
|
On-demand loading plugins by filetypes. |
|
|
Install plugins from the specified branch. |
|
|
Install plugins from the specified commit. |
|
|
Install plugins from the specified tag. |
|
|
Add the specified directory to the runtimepath. |
|
|
Execute the specified command after installation. |
|
|
Install plugins as the specified name. |
|
|
Install plugins to the specified directory. |
|
|
Freeze plugins to the current version. |
Note
|
Jetpack mechanically distinguishes :SomeCommand and <Plug>(some-command) , and the external command, for on parameters and do parameters.
|
You can pass the configuration parameters to jetpack#add
function as follows.
call jetpack#add('tani/vim-jetpack', { 'name': 'jetpack' })
The following is a list of configuration parameters for dein.vim style. Note that we do not support full features of dein.vim. We are welcome to your pull requests to improve the compatibility.
Parameter | Type | Description |
---|---|---|
|
|
On-demand loading plugins by commands. |
|
|
On-demand loading plugins by filetypes. |
|
|
On-demand loading plugins by keymaps. |
|
|
On-demand loading plugins by events. |
|
|
Install plugins from the specified branch. |
|
|
Install plugins from the specified commit. |
|
|
Install plugins from the specified tag. |
|
|
Install plugins to the specified directory. |
|
|
Add the specified directory to the runtimepath. |
|
|
Execute the specified external command after installation. |
|
|
Install plugins as the specified name. |
|
|
Merge plugins to the current runtimepath. |
|
|
Freeze plugins to the current version. |
|
|
Load the specified plugins before the plugin. |
|
|
Load the plugin before the specified plugins. |
|
|
Load the plugin after the specified plugins. |
|
|
Execute the specified Vim script at the end of |
|
|
Execute the specified Vim script before loading the plugin. |
|
|
Execute the specified Vim script after loading the plugin. |
You can pass the configuration parameters to use
function as follows.
use { 'tani/vim-jetpack', as = 'jetpack' }
Note that we do not support full features of packer.nvim. We are welcome to your pull requests to improve the compatibility.
Parameter | Type | Description |
---|---|---|
|
|
On-demand loading plugins by |
|
|
On-demand loading plugins by commands. |
|
|
On-demand loading plugins by keymaps. |
|
|
On-demand loading plugins by event. |
|
|
On-demand loading plugins by filetypes. |
|
|
Install plugins from the specified branch. |
|
|
Install plugins from the specified commit. |
|
|
Install plugins from the specified tag. |
|
|
Add the specified directory to the runtimepath. |
|
|
Execute the specified command after installation. |
|
|
Install plugins as the specified name. |
|
|
Enable the plugin after the specified plugins. |
|
|
Enable the plugin after the specified plugins. |
|
|
Enable the plugin before the specified plugins. |
|
|
Freeze plugins to the current version. |
|
|
Execute the specified function after startup. |
|
|
Execute the specified function before startup. |
Caution
|
Note that we do not install the specified plugins automatically.
You have to declare the specified plugins by use function.
|
Warning
|
Modern packer.nvim style is still experimental. The configuration parameters might be changed in the future. |
You can pass the configuration parameters to a table as follows.
{ 'tani/vim-jetpack', as = 'jetpack' }
Note that we do not support full features of packer.nvim. We are welcome to your pull requests to improve the compatibility.
Parameter | Type | Description |
---|---|---|
|
|
On-demand loading plugins by |
|
|
On-demand loading plugins by commands. |
|
|
On-demand loading plugins by keymaps. |
|
|
On-demand loading plugins by event. |
|
|
On-demand loading plugins by filetypes. |
|
|
Install plugins from the specified branch. |
|
|
Install plugins from the specified commit. |
|
|
Install plugins from the specified tag. |
|
|
Add the specified directory to the runtimepath. |
|
|
Execute the specified command after installation. |
|
|
Install plugins as the specified name. |
|
|
Install plugins after the specified plugins. |
|
|
Freeze plugins to the current version. |
|
|
Execute the specified function after startup. |
|
|
Execute the specified function before startup. |
let s:jetpackfile = expand('<sfile>:p:h') .. '/pack/jetpack/opt/vim-jetpack/plugin/jetpack.vim'
let s:jetpackurl = "https://raw.githubusercontent.com/tani/vim-jetpack/master/plugin/jetpack.vim"
if !filereadable(s:jetpackfile)
call system(printf('curl -fsSLo %s --create-dirs %s', s:jetpackfile, s:jetpackurl))
endif
"neovim + vim
let s:jetpackfile = stdpath('data') .. '/site/pack/jetpack/opt/vim-jetpack/plugin/jetpack.vim'
let s:jetpackurl = "https://raw.githubusercontent.com/tani/vim-jetpack/master/plugin/jetpack.vim"
if !filereadable(s:jetpackfile)
call system(printf('curl -fsSLo %s --create-dirs %s', s:jetpackfile, s:jetpackurl))
endif
local jetpackfile = vim.fn.stdpath('data') .. '/site/pack/jetpack/opt/vim-jetpack/plugin/jetpack.vim'
local jetpackurl = "https://raw.githubusercontent.com/tani/vim-jetpack/master/plugin/jetpack.vim"
if vim.fn.filereadable(jetpackfile) == 0 then
vim.fn.system(string.format('curl -fsSLo %s --create-dirs %s', jetpackfile, jetpackurl))
end
for name in jetpack#names()
if !jetpack#tap(name)
call jetpack#sync()
break
endif
endfor
local jetpack = require('jetpack')
for _, name in ipairs(jetpack.names()) do
if not jetpack.tap(name) then
jetpack.sync()
break
end
end
Caution
|
You might be able to use other functions, commands, and events. but it might be going to be removed in the future. Thus, we recommend you not to use unlisted ones. |
-
jetpack#begin([path])
-
The function setups jetpack plugins. All plugin declarations should be placed after this function. You can give
path
if you want to use another directory to manage plugins.
-
-
jetpack#add(repo [, options])
-
repo is a pair of string concatenated with
/
such astani/vim-jetpack
.options
is a dictionary. See below.
-
-
jetpack#sync()
-
The function performs to install, update, and bundle all plugins. The function is everything all you need to know. You must run this function after a change of your configuration.
-
-
jetpack#end()
-
The function loads declared plugins. All plugin declarations should be placed before this function.
-
-
jetpack#tap(name)
-
It returns a truthy value if the plugin is available, otherwise it returns a falsy value.
-
-
jetpack#names()
-
It returns the list of plugin names registered including unavailable plugins.
-
-
jetpack#get(name)
-
It returns metadata of the plugin if possible, otherwise it returns
{}
. This is the same asdein#get
ofdein.vim
.
-
-
jetpack#load(name)
-
This is a wrapper function for
packadd
; since it fires config options, etc., it is recommended to use this instead ofpackadd
.
-
-
jetpack#load_toml(path)
-
This function load dein-style toml settings.
-
All jetpack#
functions are exported as jetpack
module.
You can call them using require('jetpack')
as you want.
Additionally, functions compatible with packer.nvim and paq.nvim are available.
-
require('jetpack.paq')(config)
-
This function loads plugins described in config like
paq.nvim
.
-
-
require('jetpack.packer').startup(config)
-
This function loads plugins described by
use
function likepacker.nvim
.
-
-
require('jetpack.packer').add(config)
-
This function loads plugins described by
use
function likepacker.nvim
.
-
-
require('jetpack.packer').init(option)
-
Now supported option is only
package_root
.
-
-
:JetpackSync
-
The function performs to install, update, and bundle all plugins. The function is everything all you need to know. You must run this function after a change of your configuration.
-
-
:Jetpack repo [, options]
-
A command version of
jetpack#add()
. It is useful for the vim-plug style declaration of plugins in vimrc.
-
-
User JetpackPre:{plugin-name}
/User JetpackPost:{plugin-name}
-
Let {plugin-name} be the name of the plugin. The specified event is fired before/after the plugin is loaded.
-
-
User Jetpack{PluginName}Pre
/User Jetpack{PluginName}Post
-
Let {PluginName} be a CamelCase of plugin name. The specified event is fired before/after the plugin is loaded.
plugin-name EventName vim-jetpack
VimJetpack
goyo.vim
GoyoVim
vim_foo
VimFoo
-