Git Product home page Git Product logo

minpac's Introduction

Build status Build status

minpac: A minimal package manager for Vim 8 (and Neovim)

Overview

Minpac is a minimal package manager for Vim 8 (and Neovim). This uses the packages feature and the jobs feature which have been newly added on Vim 8.

Concept

  • Utilize Vim 8's packages feature.
  • Parallel install/update using Vim 8's jobs feature.
  • Simple.
  • Fast.

Requirements

  • Vim 8.0.0050+ (or Neovim 0.2+)
  • Git 1.9+
  • OS: Windows, Linux or macOS

Installation

Minpac should be installed under pack/minpac/opt/ in the first directory in the 'packpath' option. Plugins installed under pack/*/start/ are automatically added to the 'runtimepath' after .vimrc is sourced. However, minpac needs to be loaded before that. Therefore, minpac should be installed under "opt" directory, and should be loaded using packadd minpac.

Windows

Vim:

git clone https://github.com/k-takata/minpac.git %USERPROFILE%\vimfiles\pack\minpac\opt\minpac

Neovim:

git clone https://github.com/k-takata/minpac.git %LOCALAPPDATA%\nvim\pack\minpac\opt\minpac

Linux, macOS

Vim:

git clone https://github.com/k-takata/minpac.git ~/.vim/pack/minpac/opt/minpac

Neovim (use $XDG_CONFIG_HOME in place of ~/.config if set on your system):

git clone https://github.com/k-takata/minpac.git ~/.config/nvim/pack/minpac/opt/minpac

Sample .vimrc

Basic sample

" Normally this if-block is not needed, because `:set nocp` is done
" automatically when .vimrc is found. However, this might be useful
" when you execute `vim -u .vimrc` from the command line.
if &compatible
  " `:set nocp` has many side effects. Therefore this should be done
  " only when 'compatible' is set.
  set nocompatible
endif

packadd minpac

call minpac#init()

" minpac must have {'type': 'opt'} so that it can be loaded with `packadd`.
call minpac#add('k-takata/minpac', {'type': 'opt'})

" Add other plugins here.
call minpac#add('vim-jp/syntax-vim-ex')
...

" Load the plugins right now. (optional)
"packloadall

Minpac itself requires 'compatible' to be unset. However, the if &compatible-block is optional.

Customizing 'packpath'

If you want to use .vim directory instead of vimfiles even on Windows, you should add ~/.vim on top of 'packpath':

set packpath^=~/.vim
packadd minpac

call minpac#init()
...

Advanced sample

You can write a .vimrc which can be also used even if minpac is not installed.

" Try to load minpac.
packadd minpac

if !exists('g:loaded_minpac')
  " minpac is not available.

  " Settings for plugin-less environment.
  ...
else
  " minpac is available.
  call minpac#init()
  call minpac#add('k-takata/minpac', {'type': 'opt'})

  " Additional plugins here.
  ...

  " Plugin settings here.
  ...
endif

" Common settings here.
...

Load minpac on demand

Very interestingly, minpac doesn't need to be loaded every time when you execute Vim. Unlike other plugin managers, it is needed only when updating, installing or cleaning the plugins. This is because minpac itself doesn't handle the runtime path.

You can define user commands to load minpac, register the information of plugins, then call minpac#update(), minpac#clean() or minpac#status().

function! PackInit() abort
  packadd minpac

  call minpac#init()
  call minpac#add('k-takata/minpac', {'type': 'opt'})

  " Additional plugins here.
  call minpac#add('vim-jp/syntax-vim-ex')
  call minpac#add('tyru/open-browser.vim')
  ...
endfunction

" Plugin settings here.
...

" Define user commands for updating/cleaning the plugins.
" Each of them calls PackInit() to load minpac and register
" the information of plugins, then performs the task.
command! PackUpdate call PackInit() | call minpac#update()
command! PackClean  call PackInit() | call minpac#clean()
command! PackStatus packadd minpac | call minpac#status()

If you make your .vimrc reloadable, you can reflect the setting of the .vimrc immediately after you edit it by executing :so $MYVIMRC | PackUpdate. Or you can define the commands like this:

command! PackUpdate source $MYVIMRC | call PackInit() | call minpac#update()
command! PackClean  source $MYVIMRC | call PackInit() | call minpac#clean()
command! PackStatus packadd minpac | call minpac#status()

To make your .vimrc reloadable:

  • :set nocompatible should not be executed twice to avoid side effects.
  • :function! should be used to define a user function.
  • :command! should be used to define a user command.
  • :augroup! should be used properly to avoid the same autogroups are defined twice.

Sometimes, you may want to open a shell at the directory where a plugin is installed. The following example defines a command to open a terminal window at the directory of a specified plugin. (Requires Vim 8.0.902 or later.)

function! PackList(...)
  call PackInit()
  return join(sort(keys(minpac#getpluglist())), "\n")
endfunction

command! -nargs=1 -complete=custom,PackList
      \ PackOpenDir call PackInit() | call term_start(&shell,
      \    {'cwd': minpac#getpluginfo(<q-args>).dir,
      \     'term_finish': 'close'})

If you execute :PackOpenDir minpac, it will open a terminal window at ~/.vim/pack/minpac/opt/minpac (or the directory where minpac is installed).

To define a command to open the repository of a plugin in a web browser:

command! -nargs=1 -complete=custom,PackList
      \ PackOpenUrl call PackInit() | call openbrowser#open(
      \    minpac#getpluginfo(<q-args>).url)

This uses open-browser.vim.

Usage

Commands

Minpac doesn't provide any commands. Use the :call command to call minpac functions. E.g.:

" To install or update plugins:
call minpac#update()

" To uninstall unused plugins:
call minpac#clean()

" To see plugins status:
call minpac#status()

Or define commands by yourself as described in the previous section.

Functions

minpac#init([{config}])

Initialize minpac.

{config} is a Dictionary of options for configuring minpac.

option description
'dir' Base directory. Default: the first directory of the 'packpath' option.
'package_name' Package name. Default: 'minpac'
'git' Git command. Default: 'git'
'depth' Default clone depth. Default: 1
'jobs' Maximum job numbers. If <= 0, unlimited. Default: 8
'verbose' Verbosity level (0 to 4).
0: Show only important messages.
1: Show the result of each plugin.
2: Show error messages from external commands.
3: Show start/end messages for each plugin.
4: Show debug messages.
Default: 2
'confirm' Show interactive confirmation prompts, such as in minpac#clean().
Default: TRUE
'progress_open' Specify how to show the progress of minpac#update().
'none': Do not open the progress window. (Compatible with minpac v2.0.x or earlier.)
'horizontal': Open the progress window by splitting horizontally.
'vertical': Open the progress window by splitting vertically.
'tab': Open the progress window in a new tab.
Default: 'horizontal'
'status_open' Default setting for the open option of minpac#status(). Default: 'horizontal'
'status_auto' Specify whether the status window will open automatically after minpac#update() is finished.
TRUE: Open the status window automatically, when one or more plugins are updated or installed.
FALSE: Do not open the status window automatically.
Default: FALSE

All plugins will be installed under the following directories:

"start" plugins: <dir>/pack/<package_name>/start/<plugin_name>
"opt" plugins:   <dir>/pack/<package_name>/opt/<plugin_name>

"start" plugins will be automatically loaded after processing your .vimrc, or you can load them explicitly using :packloadall command. "opt" plugins can be loaded with :packadd command. See :help packages for detail.

minpac#add({url}[, {config}])

Register a plugin.

{url} is a URL of a plugin. It can be a short form ('<github-account>/<repository>') or a valid git URL. If you use the short form, <repository> should not include the ".git" suffix. Note: Unlike Vundle, a short form without <github-account>/ is not supported. (Because vim-scripts.org is not maintained now.)

{config} is a Dictionary of options for configuring the plugin.

option description
'name' Unique name of the plugin (plugin_name). Also used as a local directory name. Default: derived from the repository name.
'type' Type of the plugin. 'start' or 'opt'. Default: 'start'
'frozen' If TRUE, the plugin will not be updated automatically. Default: FALSE
'depth' If >= 1, it is used as a depth to be cloned. Only effective when install the plugin newly. Default: 1 or specified value by minpac#init().
'branch' Used as a branch name to be cloned. Only effective when install the plugin newly. Default: empty
'rev' Commit ID, branch name or tag name to be checked out. If this is specified, 'depth' will be ignored. Default: empty
'do' Post-update hook. See Post-update hooks. Default: empty
'subdir' Subdirectory that contains Vim plugin. Default: empty
'pullmethod' Specify how to update the plugin.
Empty: Update with --ff-only option.
'autostash': Update with --rebase --autostash options.
Default: empty

The 'branch' and 'rev' options are slightly different.
The 'branch' option is used only when the plugin is newly installed. It clones the plugin by git clone <URL> --depth=<DEPTH> -b <BRANCH>. This is faster at the installation, but it can be slow if you want to change the branch (by the 'rev' option) later. This cannot specify a commit ID. The 'rev' option is used both for installing and updating the plugin. It installs the plugin by git clone <URL> && git checkout <REV> and updates the plugin by git fetch && git checkout <REV>. This is slower because it clones the whole repository, but you can change the rev (commit ID, branch or tag) later. So, if you want to change the branch frequently or want to specify a commit ID, you should use the 'rev' option. Otherwise you can use the 'branch' option.

If you include * in 'rev', minpac tries to checkout the latest tag name which matches the 'rev'.

When 'subdir' is specified, the plugin will be installed as usual (e.g. in pack/minpac/start/pluginname), however, another directory is created and a symlink (or a junction on Windows) will be created in it. E.g.:

ln -s pack/minpac/start/pluginname/subdir pack/minpac-sub/start/pluginname

This way, Vim can load the plugin from its subdirectory.

minpac#update([{name}[, {config}]])

Install or update all plugins or the specified plugin.

{name} is a unique name of a plugin (plugin_name).

If {name} is omitted or an empty String, all plugins will be installed or updated. Frozen plugins will be installed, but it will not be updated.

If {name} is specified, only specified plugin will be installed or updated. Frozen plugin will be also updated. {name} can also be a list of plugin names.

{config} is a Dictionary of options for configuring the function.

option description
'do' Finish-update hook. See Finish-update hooks. Default: empty

You can check the results with :message command.

Note: This resets the 'more' option temporarily to avoid jobs being interrupted.

minpac#clean([{name}])

Remove all plugins which are not registered, or remove the specified plugin.

{name} is a name of a plugin. It can be a unique plugin name (plugin_name) or a plugin name with wildcards (* and ? are supported). It can also be a list of plugin names.

If {name} is omitted, all plugins under the minpac directory will be checked. If unregistered plugins are found, they are listed and a prompt is shown. If you type y, they will be removed.

When called, matched plugins are listed (even they are registered with minpac#add()) and a prompt is shown. If you type y, they will be removed. {name} can also be a list of plugin names. If the 'confirm' option is not |TRUE|, the prompt will not be shown.

minpac#getpluginfo({name})

Get information of specified plugin.

{name} is a unique name of a plugin (plugin_name). A dictionary with following items will be returned:

item description
'name' Name of the plugin.
'url' URL of the plugin repository.
'dir' Local directory of the plugin.
'subdir' Subdirectory that contains Vim plugin.
'frozen' If TRUE, the plugin is frozen.
'type' Type of the plugin.
'depth' Depth to be cloned.
'branch' Branch name to be cloned.
'rev' Revision to be checked out.
'do' Post-update hook.
'stat' Status of last update.

minpac#getpluglist()

Get a list of plugin information. Mainly for debugging.

minpac#getpackages([{packname}[, {packtype}[, {plugname}[, {nameonly}]]]])

Get a list of plugins under the package directories.

{packname} specifies a package name. Wildcards can be used. If omitted or an empty string is specified, "*" is used.

{packtype} is a type of the package. "*", "start", "opt" or "NONE" can be used. If "*" is specified, both start and opt packages are listed. If omitted or an empty string is specified, "*" is used. If "NONE" is specified, package directories are listed instead of plugin directories.

{plugname} specifies a plugin name. Wildcards can be used. If omitted or an empty string is specified, "*" is used.

If {nameonly} is TRUE, plugin (or package) names are listed instead of the directories. Default is FALSE.

E.g.:

" List the all plugin directories under the package directories.
" Includes plugins under "dist" package.
echo minpac#getpackages()

" List directories of "start" plugins under "minpac" package.
echo minpac#getpackages("minpac", "start")

" List plugin names under "minpac" package.
echo minpac#getpackages("minpac", "", "", 1)

" List package names.
echo minpac#getpackages("", "NAME", "", 1)

minpac#status([{config}])

Print status of plugins.

When ran after minpac#update(), shows only installed and updated plugins.

Otherwise, shows the status of the plugin and commits of last update (if any).

{config} is a Dictionary of options for configuring the function.

option description
'open' Specify how to open the status window.
'vertical': Open in vertical split.
'horizontal': Open in horizontal split.
'tab': Open in a new tab.
Default: 'horizontal' or specified value by minpac#init().

Hooks

Currently, minpac supports two types of hook: Post-update hooks and Finish-update hooks.

Post-update hooks

If a plugin requires extra works (e.g. building a native module), you can use the post-update hooks.

You can specify the hook with the 'do' item in the option of the minpac#add() function. It can be a String or a Funcref. If a String is specified, it is executed as an Ex command. If a Funcref is specified, it is called with two arguments; hooktype and name.

argument description
hooktype Type of the hook. 'post-update' for post-update hooks.
name Unique name of the plugin. (plugin_name)

The current directory is set to the directory of the plugin, when the hook is invoked.

E.g.:

" Execute an Ex command as a hook.
call minpac#add('Shougo/vimproc.vim', {'do': 'silent! !make'})

" Execute a lambda function as a hook.
" Parameters for a lambda can be omitted, if you don't need them.
call minpac#add('Shougo/vimproc.vim', {'do': {-> system('make')}})

" Of course, you can also use a normal user function as a hook.
function! s:hook(hooktype, name)
  echom a:hooktype
  " You can use `minpac#getpluginfo()` to get the information about
  " the plugin.
  echom 'Directory:' minpac#getpluginfo(a:name).dir
  call system('make')
endfunction
call minpac#add('Shougo/vimproc.vim', {'do': function('s:hook')})

The above examples execute the "make" command synchronously. If you want to execute an external command asynchronously, you should use the job_start() function on Vim 8 or the jobstart() function on Neovim. You may also want to use the minpac#job#start() function, but this is mainly for internal use and the specification is subject to change without notice.

Finish-update hooks

If you want to execute extra works after all plugins are updated, you can use the finish-update hooks.

You can specify the hook with the 'do' item in the option of the minpac#update() function. It can be a String or a Funcref. If a String is specified, it is executed as an Ex command. If a Funcref is specified, it is called with three arguments; hooktype, updated and installed.

argument description
hooktype Type of the hook. 'finish-update' for finish-update hooks.
updated Number of the updated plugin.
installed Number of the newly installed plugin.

E.g.:

" Quit Vim immediately after all updates are finished.
call minpac#update('', {'do': 'qall'})

Mappings

List of mappings available only in progress window.

mapping description
s Open the status window.
q Exit the progress window.

List of mappings available only in status window.

mapping description
<CR> Preview the commit under the cursor.
<C-j> Jump to next package in list.
<C-k> Jump to previous package in list.
q Exit the status window.
(Also works for commit preview window)

Similar projects

There are some other plugin managers built on top of the Vim 8's packages feature.

Credit

Prabir Shrestha (as the author of async.vim)
Kristijan Husak (status window)

License

VIM License

(autoload/minpac/job.vim is the MIT License.)

minpac's People

Contributors

ahmedelgabri avatar averms avatar bennyyip avatar k-takata avatar kristijanhusak avatar lambdalisue avatar matveyt avatar neersighted avatar nelstrom avatar partcyborg avatar rockyzhang24 avatar scy avatar srstevenson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minpac's Issues

Error while updating plugin

Is there a way to find ou why I get "Error while updating "ctrlp.vim" when running :call minpac#update()? All other plugins update just fine. Thanks

Edit: reinstalled ctrlp and everything is ok now

Supporting local paths?

Any chance of supporting local paths in addition to git/github urls? This is super useful for package development, as well as necessary for using packages like fzf.vim, which needs to load a local file:

" using vim-plug
Plug '/usr/local/opt/fzf'
Plug 'junegunn/fzf.vim'

AFAICT, this isn't currently possible with minpac. Please let me know if I'm mistaken!

Not working on Macvim

Hi guys, while minpac is perfectly working for me in a terminal, it fails on Macvim (GUI mode) with the following error message:

Error detected while processing function minpac#update[2]..minpac#impl#update[35]..<SNR>118_update_single_plugin[31]..<SNR>118_get_plugin_revision[3]..
<SNR>118_system[8]..minpac#job#wait[2]..<SNR>119_job_wait[6]..<SNR>119_job_wait_single:
line   10:
E806: using Float as a String
E15: Invalid expression: a:timeout / 1000.0    

Mac OS 10.13.3

MacVim Custom Version 8.0.1522 (145)

~$ /Applications/MacVim.app/Contents/bin/vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 18 2018 04:09:42)
macOS version
Included patches: 1-1522
Compiled by [email protected]
Huge version with MacVim GUI.  Features included (+) or not (-):
+acl               +farsi             +mouse_netterm     +tag_binary
+arabic            +file_in_path      +mouse_sgr         +tag_old_static
+autocmd           +find_in_path      -mouse_sysmouse    -tag_any_white
-autoservername    +float             +mouse_urxvt       -tcl
+balloon_eval      +folding           +mouse_xterm       +termguicolors
+balloon_eval_term -footer            +multi_byte        +terminal
+browse            +fork()            +multi_lang        +terminfo
++builtin_terms    +fullscreen        -mzscheme          +termresponse
+byte_offset       -gettext           +netbeans_intg     +textobjects
+channel           -hangul_input      +num64             +timers
+cindent           +iconv             +odbeditor         +title
+clientserver      +insert_expand     +packages          +toolbar
+clipboard         +job               +path_extra        +transparency
+cmdline_compl     +jumplist          +perl/dyn          +user_commands
+cmdline_hist      +keymap            +persistent_undo   +vertsplit
+cmdline_info      +lambda            +postscript        +virtualedit
+comments          +langmap           +printer           +visual
+conceal           +libcall           +profile           +visualextra
+cryptv            +linebreak         +python/dyn        +viminfo
+cscope            +lispindent        +python3/dyn       +vreplace
+cursorbind        +listcmds          +quickfix          +wildignore
+cursorshape       +localmap          +reltime           +wildmenu
+dialog_con_gui    +lua/dyn           +rightleft         +windows
+diff              +menu              +ruby/dyn          +writebackup
+digraphs          +mksession         +scrollbind        -X11
+dnd               +modify_fname      +signs             -xfontset
-ebcdic            +mouse             +smartindent       +xim
+emacs_tags        +mouseshape        +startuptime       -xpm
+eval              +mouse_dec         +statusline        -xsmp
+ex_extra          -mouse_gpm         -sun_workshop      -xterm_clipboard
+extra_search      -mouse_jsbterm     +syntax            -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -DMACOS_X -DMACOS_X_DARWIN  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: clang   -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib  -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon       -lm  -lncurses -liconv -framework AppKit   -fstack-protector  -L/System/Library/Perl/5.16/darwin-thread-multi-2level/CORE 

FYI: My modifications to install into different packages

First, thanks for sharing a great plugin.

As an FYI:
For my own purposes, I modified it to so it would fit in my workflow. Mainly, so it would install plugins into different packages. So that I could understand the code, I retyped/restructured/renamed it. I renamed it not to take credit, but to keep me straight.

The structural changes are such that a a pull request simply is not feasible.

If you want to see the changes: https://github.com/meldavis/autopac

Thanks again. Mel.

Is there a way to unload a plugin?

I have an issue with a plugin so I only load it when necessary with :packadd. A more convenient way would be to do the opposite, because the issue only occurs in certain scenarios. Is there a command I could use to unload the plugin without having to restart Vim? Thanks :)

NeoVim support

Would you be interested in making this work for NeoVim as well? The tagline "A minimal package manager for Vim 8" suggests not, but I wonder how determined you are to keep things minimal?

Provide an example of how to install a package / plugin with a post-install hook

I've been using minpac for a little bit, and I really enjoy the simplistic nature of it, but the terse example of working with packages in the README.md that require post-install hooks comes across as a little bit confusing to me. 🤷‍♂️ I'm no Vimscript ninja by any means, but I gave it the ol college attempt at trying to understand at what is going on with setting up a package / plugin that requires a post-install hook.

Presently I'm using vim-markdown-composer to preview markdown documents that I edit via Vim and Neovim in my default browser, and vim-markdown-composer requires a working rust toolchain to compile properly. I tried a couple of scenarios to download the vim-markdown-composer package and get it to build all in one step when running PackUpdate but the only solution that I'm presently able to get working is,

call minpac#add('euclio/vim-markdown-composer', {'do': '!cargo build --release'})

Optionally I could not get the below to work

function! s:hook(hooktype, name)
  echom a:hooktype
  echom 'Directory:' minpac#getplugininfo(a:name).dir
  call system('cargo build --release')
endfunction
call minpac#add('euclio/vim-markdown-composer', { 'do': function('s:hook')})

Ideally, in a perfect world, I'd like to call function to update the cargo build of this package, when either the vim package or the rust toolchain is updated which seems to be quite frequent.

The ol have my cake 🎂 and eat it, 🍰 at the same time.

Plugins are loaded in neovim but not in vim

That's my settings in .vimrc

if empty(glob('~/.vim/pack/minpac'))
  silent !git clone https://github.com/k-takata/minpac.git ~/.vim/pack/minpac/opt/minpac
  autocmd VimEnter * call minpac#update() | source $MYVIMRC
endif

set packpath^=~/.vim
silent! packadd minpac

if exists('*minpac#init')
  command! PackUpdate packadd minpac | source $MYVIMRC | call minpac#update()
  command! PackClean  packadd minpac | source $MYVIMRC | call minpac#clean()

  call minpac#init()
  call minpac#add('k-takata/minpac', {'type': 'opt'})
  " ...rest of the plugins
endif

init.vim

set runtimepath+=~/.vim,~/.vim/after
source ~/.vimrc

echo minpac#getpackages()

Inside nvim

['/Users/ahmed/.vim/pack/minpac/opt/minpac', '/Users/ahmed/.config/nvim/pack/minpac/opt/minpac', '/Users/ahmed/.config/nvim/pack/minpac/opt/tagbar', '/Users/ahmed/.config/nvim/pack/minpac/opt/undotree', '/Users/ahmed/.config/nvim/pack
/minpac/opt/vim-easy-align', '/Users/ahmed/.config/nvim/pack/minpac/opt/vim-grepper', '/Users/ahmed/.config/nvim/pack/minpac/opt/vim-sayonara', '/Users/ahmed/.config/nvim/pack/minpac/opt/vim-table-mode', '/Users/ahmed/.config/nvim/pac
k/minpac/opt/vimfiler.vim', '/Users/ahmed/.config/nvim/pack/minpac/start/Despacio', '/Users/ahmed/.config/nvim/pack/minpac/start/LanguageClient-neovim', '/Users/ahmed/.config/nvim/pack/minpac/start/MatchTagAlways', '/Users/ahmed/.conf
ig/nvim/pack/minpac/start/ale', '/Users/ahmed/.config/nvim/pack/minpac/start/auto-pairs', '/Users/ahmed/.config/nvim/pack/minpac/start/blame.vim', '/Users/ahmed/.config/nvim/pack/minpac/start/editorconfig-vim', '/Users/ahmed/.config/n
vim/pack/minpac/start/fzf.vim', '/Users/ahmed/.config/nvim/pack/minpac/start/gen_tags.vim', '/Users/ahmed/.config/nvim/pack/minpac/start/gina.vim', '/Users/ahmed/.config/nvim/pack/minpac/start/goyo.vim', '/Users/ahmed/.config/nvim/pac
k/minpac/start/gruvbox', '/Users/ahmed/.config/nvim/pack/minpac/start/limelight.vim', '/Users/ahmed/.config/nvim/pack/minpac/start/loupe', '/Users/ahmed/.config/nvim/pack/minpac/start/ncm-github', '/Users/ahmed/.config/nvim/pack/minpa
c/start/ncm-lbdb', '/Users/ahmed/.config/nvim/pack/minpac/start/neco-vim', '/Users/ahmed/.config/nvim/pack/minpac/start/nvim-cm-tern', '/Users/ahmed/.config/nvim/pack/minpac/start/nvim-completion-manager', '/Users/ahmed/.config/nvim/p
ack/minpac/start/pinnacle', '/Users/ahmed/.config/nvim/pack/minpac/start/targets.vim', '/Users/ahmed/.config/nvim/pack/minpac/start/terminus', '/Users/ahmed/.config/nvim/pack/minpac/start/tpope-vim-abolish', '/Users/ahmed/.config/nvim
/pack/minpac/start/ultisnips', '/Users/ahmed/.config/nvim/pack/minpac/start/unite.vim', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-buftabline', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-code-dark', '/Users/ahmed/.config/n
vim/pack/minpac/start/vim-commentary', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-css-color', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-deep-space', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-diminactive', '/Users/a
hmed/.config/nvim/pack/minpac/start/vim-easydir', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-eunuch', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-gista', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-gitgutter', '/Users/
ahmed/.config/nvim/pack/minpac/start/vim-github-hub', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-gotham', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-hybrid', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-one', '/Users/a
hmed/.config/nvim/pack/minpac/start/vim-peekaboo', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-polyglot', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-projectionist', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-reason-pl
us', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-repeat', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-signature', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-sleuth', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-sne
ak', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-solarized8', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-speeddating', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-startify', '/Users/ahmed/.config/nvim/pack/minpac/start
/vim-surround', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-tmux-navigator', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-twig', '/Users/ahmed/.config/nvim/pack/minpac/start/vim-visual-star-search', '/usr/local/Cellar/neovim/
0.2.1/share/nvim/runtime/pack/dist/opt/justify', '/usr/local/Cellar/neovim/0.2.1/share/nvim/runtime/pack/dist/opt/shellmenu', '/usr/local/Cellar/neovim/0.2.1/share/nvim/runtime/pack/dist/opt/swapmouse', '/usr/local/Cellar/neovim/0.2.1
/share/nvim/runtime/pack/dist/opt/termdebug', '/usr/local/Cellar/neovim/0.2.1/share/nvim/runtime/pack/dist/opt/vimball']

inside vim

['/Users/ahmed/.vim/pack/minpac/opt/minpac', '/usr/local/share/vim/vim80/pack/dist/opt/dvorak', '/usr/local/share/vim/vim80/pack/dist/opt/editexisting', '/usr/local/share/vim/vim80/pack/dist/opt/justify', '/usr/local/share/vim/vim80/p
ack/dist/opt/matchit', '/usr/local/share/vim/vim80/pack/dist/opt/shellmenu', '/usr/local/share/vim/vim80/pack/dist/opt/swapmouse', '/usr/local/share/vim/vim80/pack/dist/opt/termdebug']

vim --version

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 18 2017 08:24:50)
macOS version
Included patches: 1-1300
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +tag_binary
+arabic          +file_in_path    +mouse_sgr       +tag_old_static
+autocmd         +find_in_path    -mouse_sysmouse  -tag_any_white
-autoservername  +float           +mouse_urxvt     -tcl
-balloon_eval    +folding         +mouse_xterm     +termguicolors
-browse          -footer          +multi_byte      +terminal
++builtin_terms  +fork()          +multi_lang      +terminfo
+byte_offset     -gettext         -mzscheme        +termresponse
+channel         -hangul_input    +netbeans_intg   +textobjects
+cindent         +iconv           +num64           +timers
-clientserver    +insert_expand   +packages        +title
+clipboard       +job             +path_extra      -toolbar
+cmdline_compl   +jumplist        +perl            +user_commands
+cmdline_hist    +keymap          +persistent_undo +vertsplit
+cmdline_info    +lambda          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       -python          +viminfo
+cscope          +lispindent      +python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      +startuptime     -xpm
+eval            +mouse_dec       +statusline      -xsmp
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_clipboard
+extra_search    -mouse_jsbterm   +syntax          -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X -DMACOS_X_DARWIN  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: clang   -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib  -L/usr/local/lib -o vim        -lncurses -liconv -framework AppKit  -L/usr/local/lib -llua -mmacosx-version-min=10.12 -fstack-protector-strong -L/usr/local/lib  -L/usr/local/Cellar/perl/5.26.1/lib/perl5/5.26.1/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc  -L/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin -lpython3.6m -framework CoreFoundation  -lruby.2.4.2 -lobjc    

nvim --version

NVIM v0.2.1
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -I/tmp/neovim-20171109-46118-9kky38/neovim-0.2.1/build/config -I/tmp/neovim-20171109-46118-9kky38/neovim-0.2.1/src -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/tmp/neovim-20171109-46118-9kky38/neovim-0.2.1/build/src/nvim/auto -I/tmp/neovim-20171109-46118-9kky38/neovim-0.2.1/build/include
Compiled by [email protected]

Features: +acl +iconv +jemalloc +tui 
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.2.1/share/nvim"

Run :checkhealth for more info

Running post-update hook for YCM does not work

Hi, I managed to install all of my plugins with minpac today, however I could not finish the YouCompleteMe installation.

With vim-plug, the following line was sufficient:

Plug 'Valloric/YouCompleteMe', {'do' : './install.py --clang-completer'}

It seems the YCM git submodules are not updated once the plugin is installed, I tried the following with no success (the only output is shell returned 1)

call minpac#add('Valloric/YouCompleteMe', {'do':'!git submodule update --init --recursive && ./install.py --clang-completer'})

This is not really blocking, I can perform this by hand, but that'd be great if it was supported :)

Documentation: on vim, specify "set nocompatible" when using the -u option

TLDR

In vim (not neovim) set nocompatible seems to be necessary for minpac to init and work properly. This line might usually come from a system vimrc; but that file is not read when loading a custom local vimrc with the -u flag, and this might puzzle some user.

I would add a documentation notice to explicitly declare this.

Long explaination

Hello,
when loading brew macvim, version

VIM - Vi IMproved 8.1 (2018 May 18, compiled Aug 31 2018 10:52:37)
macOS version
Included patches: 1-280
Compiled by Homebrew
Huge version with MacVim GUI.  Features included (+) or not (-):
...

I had to load a custom vimrc file for some tests.

I initially made a custom vimrc, same as the minimal minpac example from README.md

" vimrc
packadd minpac

call minpac#init()

" minpac must have {'type': 'opt'} so that it can be loaded with `packadd`.
call minpac#add('k-takata/minpac', {'type': 'opt'})

" Add other plugins here.
call minpac#add('vim-jp/syntax-vim-ex')
...

" Load the plugins right now. (optional)
"packloadall

and I was running macvim with this custom file only, using

/usr/local/bin/vim -u ./vimrc

Unfortunately, minpac#init() was not working:

Error detected while processing function minpac#init:
line    1:
E116: Invalid arguments for function extend(copy(get(a:000, 0, {})),
E15: Invalid expression: extend(copy(get(a:000, 0, {})),
Press ENTER or type command to continue

I found out this is due to the following line being missing from my custom configuration:

set nocompatible

...which in my Macvim/brew version is usually found in /usr/local/Cellar/macvim/8.1-151/MacVim.app/Contents/Resources/vim/vimrc (system vimrc). This is part of the usual vim configuration file hierarchy when loading vim normally.

Unfortunately, when loading a custom vimrc file using the -u flag, that file is NOT read.

I think it would be a good idea to specify in the documentation that this plugin requires set nocompatible to init.

Switch from Vundle to minpac

First of all let me say, that the switch from Vundle to minpac went astonishingly well.

Note that after doing the general setup of minpac, as well as mv ~/.vim/bundle ~/.vim/pack/minpac/start and replacing Plugin 'pluginname' with call minpac#add('pluginname'), I got several errors saying "Cannot specify the plugin name", which was quite confusing. So I replaced the error message in the minpac code with:

echoerr 'Cannot extract the plugin name. (' . a:plugname . ')'

It turns out Vundle supports plugins from http://vim-scripts.org/vim/scripts.html, just be giving a name containing no slash, but minpac does not. As a solution, I used the github version under the vim-scripts/pluginname.

I think this (and maybe other?) error message needs to more descriptive. Also a section in the readme about switching from Vundle might be helpful for the uninitiated.

Add way to update to stable releases only

As far as I can tell minpac only has the ability to pull in updates from the master via git. I'd love to be able to run :PackUpdate and have it only pull in new releases – which in my experience is a much better indicator of stability than what's in master.

[Enhancement] Show updates

It would be great to be able to see list of all new commits for each package after minpac#update() . Vim plug has this covered nicely.

Paging `echom` interrupts jobs

I've recorded a screencast demonstration:

minpac-paged-updates

To reproduce:

  1. rm -rf ~/.vim/pack/minpac/start
  2. launch vim
  3. run :call minpac#update()

In this demo, I've got 44 plugins being cloned into the start directory (plus a few more in the opt directory). My terminal window is 22 lines tall, allowing for 20 or so messages to be printed by echo or echom before the -- More -- prompt appears. It seems as though minpac stalls while the -- More -- prompt is visible. When I press the space bar, the -- More -- prompt disappears and the next page of messages fills the screen, allowing the minpac jobs to continue until the screen fills up again, and so on...

The same thing happens both in vim and nvim. (I used nvim for this screencast, in part to demonstrate that #3 is fixed)

Autoload an opt plugin on Filetype.

After reading the documentation it seems that it's the user responsibility to load opt plugins. ( with :packadd)
Could minpac provide an API to load plugins on certain filetypes? Or is there an easy native way( besides Autocomd's) to do it?

Better error handling

Hi Ken,
had some networking problems and hostnames could not be resolved. When running
:PackUpdate ( minpac#update()) it spit out a whole lot of those errors:

vim-airline-themes: ssh: Could not resolve hostname github.com: Name or service not known^M
vim-airline-themes: fatal: Could not read from remote repository.
vim-airline-themes:
vim-airline-themes: Please make sure you have the correct access rights
vim-airline-themes: and the repository exists.
vim-airline-themes:
vim-vimlint: fatal: unable to access 'https://github.com/syngan/vim-vimlint.git/': Could not resolve host: github.com
vim-vimlint:
Error while updating "vim-vimlint": 1
Error while updating "vim-airline-themes": 1
w0rp: fatal: unable to access 'https://github.com/ale/w0rp.git/': Could not resolve host: github.com
w0rp:
vim-vimlparser: fatal: unable to access 'https://github.com/vim-jp/vim-vimlparser.git/': Could not resolve host: github.com
vim-vimlparser:
Error while updating "vim-vimlparser": 1
Error while updating "w0rp": 128
minpac: fatal: unable to access 'https://github.com/k-takata/minpac.git/': Could not resolve host: github.com
minpac:
syntastic: fatal: unable to access 'https://github.com/vim-syntastic/syntastic.git/': Could not resolve host: github.com
syntastic:
Error while updating "syntastic": 1
Error while updating "minpac": 1
incsearch.vim: fatal: unable to access 'https://github.com/haya14busa/incsearch.vim.git/': Could not resolve host: github.com
incsearch.vim:
vim-airline: ssh: Could not resolve hostname github.com: Name or service not known^M
vim-airline: fatal: Could not read from remote repository.
vim-airline:
vim-airline: Please make sure you have the correct access rights
vim-airline: and the repository exists.
vim-airline:
Error while updating "vim-airline": 1
All plugins are up to date.

Perhaps errors could be handled more gracefully? Thanks!

minpac#update()で存在しないプラグイン名を指定するとその後のminpac#update()が動作しない(Previous update has not been finished.と表示される)

すみません。日本語で失礼します。

再現方法

vimrcに以下を記載

set packpath^=$VIM\.vim
packadd minpac
call minpac#init()
call minpac#add('k-takata/minpac', {'type': 'opt'})
call minpac#add('Shougo/unite.vim')

vim起動後、以下のようにminpac#update()の引数に存在しない
プラグイン名を指定するとその後のminpac#update()でプラグインのupdate
ができなくなってしまいます。
(Previous update has not been finished.というメッセージが表示されてしまいます)

call minpac#update('unite.vim')
" 以下がechoされる
" Updated: unite.vim
" Finished.

call minpac#update('not-exist-plugin.vim') " 存在しないプラグインを指定
" 以下がechoされる
" function minpac#update[1]..minpac#impl#update[22]..<SNR>89_update_single_plugin の処理中にエラーが検出されました:
" 行    2:
" Plugin not registered: not-exist-plugin.vim

call minpac#update('unite.vim') " 再度プラグインのupdate
" 正常にプラグインのupdateが実行されることが期待値だと思われるが、以下がechoされてしまいupdateされない
" Previous update has not been finished.

vim

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 13 2016 15:12:16)
MS-Windows 64 ビット GUI 版
適用済パッチ: 1-82

OS

Windows 10 HOME

すみませんが、ご確認をお願いいたします。

Error E518 when installing plugins

Up until a while ago, minpac worked pretty well. Today, it started giving me E518 for all new plugins. (I could not copy the error message so here's a screenshot.)

image

My nvim directory is located within a path that has a pace in it: C:\Users\Hajime Yamasaki\AppData\Local\nvim. It looks like it doesn't like the space.

The plugin files are correctly checked out at an appropriate location, and plugin does work after restarting NeoVim.

Packages all installed into pack/minpac rather than their own pack/ subdirectories

Currently, every package you install ends up in a directory pack/minpac/$TYPE/$PACKAGE_NAME, which I find a little confusing. The documentation states that packages will be installed into the following directories:

"start" plugins: <dir>/pack/<package_name>/start/<plugin_name>
"opt" plugins:   <dir>/pack/<package_name>/opt/<plugin_name>

I believe what this intends to say is that if you rename minpac itself, when you call minpac#init(), you can put everything under a different subdirectory of pack?

However, I initially interpreted this to mean that packages will be installed separately, such that package X ends up in pack/X/start/X rather than pack/minpac/start/X.

Is this design intentional? Does it perform better than using many separate Vim packages, for example? If not, should this be changed to align with my initial expectation?

Some plugins are not loaded properly?

I'm using https://github.com/pangloss/vim-javascript for JavaScript

And here is a file using minpac to load the plugin vs vim-plug

Loaded with minpac
screen shot 2017-11-26 at 19 18 21

Loaded with vim-plug
screen shot 2017-11-26 at 19 19 17

And here is a minimal setup that I tried

set packpath^=~/.vim
silent! packadd minpac

if !exists('*minpac#init')
  finish
endif

call minpac#init()
call minpac#add('k-takata/minpac', {'type': 'opt'})
call minpac#add('pangloss/vim-javascript')

Any idea what might cause this issue?

alternate on-demand loading

function PackInit()
  if exists('*minpac#init')
    return
  end

  packadd minpac
  call minpac#init()
  call minpac#add('k-takata/minpac', {'type': 'opt'})

  " Additional plugins here.
  call minpac#add('Raimondi/delimitMate')
  call minpac#add('justinmk/vim-sneak')
endfunction

command! PackUpdate call PackInit() | call minpac#update()
command! PackClean  call PackInit() | call minpac#clean()

doesn't reload the vimrc, so no paranoia needed

Install only new plugins

Is there a way to install new plugins without updating the rest of them? I now I can call minpac#update and provide names for the plugins I want to install, but I would like to make command
to automatize the process. Is there a way to retrieve list of plugins which are registered but not installed?

E121 when updating plugins

Calling minpac#update occasionally fails with following error message:

Error detected while processing function minpac#update[2]..minpac#impl#update[35]..<SNR>190_update_single_plugin[54]..<SNR>190_check_plugin_status[2]..minpac#impl#get_plugin_revision[1]..<SNR>190_exec_plugin_cmd[3]..minpac#impl#system:
line   11:
E121: Undefined variable: l:ret

minpac#impl#system doesn't always assign value to l:ret:

function! minpac#impl#system(cmds) abort
let l:out = []
let l:quote_cmds = s:quote_cmds(a:cmds)
call s:echom_verbose(4, 'system: cmds=' . string(l:quote_cmds))
let l:job = minpac#job#start(l:quote_cmds,
\ {'on_stdout': {id, mes, ev -> extend(l:out, mes)}})
if l:job > 0
" It worked!
let l:ret = minpac#job#wait([l:job])[0]
sleep 5m " Wait for out_cb. (not sure this is enough.)
endif
return [l:ret, l:out]
endfunction

Arbitrarily Opens the ssh dialog with MacVim.

call minpac#update() opens the following ssh input dialog.

screen shot 2018-07-16 at 13 57 22

This issue occurs when '.git' is included in the name as shown below.

call minpac#add('tpope/vim-projectionist.git')

But this doesn't occur.

call minpac#add('tpope/vim-projectionist')

Thank you for creating great this plugin.

Errors updating plugins E15

If I try to install my plugins from scratch, I get E15: Invalid expression: l:pluginfo.stat.upd_method == 2 multiple times

Here is the output from :Messages using vim-scriptease & here is my config

files/.vim/pack/minpac/opt/minpac/autoload/minpac/job.vim|94| <SNR>8_on_exit[4]
files/.vim/pack/minpac/opt/minpac/autoload/minpac/impl.vim|214| <SNR>7_job_exit_cb[19]
|| E15: Invalid expression: l:pluginfo.stat.upd_method == 2
|| Error detected while processing function

minpac#update()に時間がかかる

日本語で失礼します。

再現環境

Windows 10

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 13 2016 09:58:24)
MS-Windows 64 ビット コンソール 版
適用済パッチ: 1-3

再現方法

※minpac(727d0cf)を取得しておきます。

vimrcに以下を記載

set packpath^=$VIM\.vim

packadd minpac
call minpac#init({'package_name': 'm', 'verbose': 1, 'jobs': 8})

call minpac#add('k-takata/minpac', {'frozen': 1})
call minpac#add('kana/vim-textobj-user')
call minpac#add('sgur/vim-textobj-parameter')
call minpac#add('thinca/vim-textobj-between')
call minpac#add('glts/vim-textobj-comment')
call minpac#add('kana/vim-textobj-line')

vimを起動し、以下を実行します。

echomsg strftime('%H:%M:%S') | call minpac#update() | echomsg strftime('%H:%M:%S')

結果は以下となり、時間がかかってしまいます。

13:26:24
Already up-to-date: vim-textobj-between
Already up-to-date: vim-textobj-user
Already up-to-date: vim-textobj-line
Skipped: minpac
Already up-to-date: vim-textobj-parameter
13:28:00
Already up-to-date: vim-textobj-comment
All plugins are up to date.

少し古いminpac(02b6415)で実行した結果を以下に記載します。
こちらは高速でした。

13:36:27
Updating vim-textobj-between
Updating vim-textobj-user
Updating vim-textobj-line
Updating vim-textobj-parameter
Skipping minpac
Updating vim-textobj-comment
13:36:27

流れていくるmessageの順番的に最新版ではマルチスレッドになっていないような気がします。
neovim対応のどこかでこのようになってしまったと思うのですが、原因が分かりません。
(もしくはminpac#init()時のオプション不足かもしれません。)

お手数をおかけしますが、ご確認をお願いいたします。

Update plugin after changing branch in config

Let's say I have a following line in my vimrc

call minpac#add('EgZvor/dracula-vim')

I install the plugin, but then find out that I needed to specify a branch. So I change the config to:

call minpac#add('EgZvor/dracula-vim', {'branch': 'draculasplit'})

However after calling minpac#update nothing will happen, because it only checks if a plugin directory exists.

Function called from within a post update hook doesn't work but using it as a post update hook works

I'm trying to add a custom post update hook, when I do this it blows up

  let s:coc_extensions = [
        \ 'coc-css',
        \ 'coc-rls',
        \ 'coc-html',
        \ 'coc-json',
        \ 'coc-pyls',
        \ 'coc-yaml',
        \ 'coc-emoji',
        \ 'coc-tsserver',
        \ 'coc-ultisnips',
        \ 'coc-highlight'
        \ ]

  function! s:coc_plugins() abort
    call coc#util#install() " Throws here
    call coc#util#install_extension(join(get(s:, 'coc_extensions', [])))
  endfunction

  call minpac#add('https://github.com/neoclide/coc.nvim', {'do': function('s:coc_plugins')})

while this works as expected actually this also stopped working...

  call minpac#add('https://github.com/neoclide/coc.nvim', {'do': { -> coc#util#install() } })

Any idea where is the problem & how to make it work?

is it possible to disable (and possibly clean an existing plugin)?

Hi Ken,
great plugin! However I have one usage question.
I have this in my .vimrc:

packadd minpac
call minpac#init()
call minpac#add('vim-airline/vim-airline')
call minpac#add('vim-airline/vim-airline-themes')
call minpac#add('morhetz/gruvbox')
call minpac#add('bling/vim-bufferline')
command! PackUpdate packadd minpac | source $MYVIMRC | call minpac#update()
command! PackClean  packadd minpac | source $MYVIMRC | call minpac#clean()
packloadall

Is there a possibility to disable e.g. bling/vim-bufferline (and also to remove its directory completly)?
I tried using call minpac#clean('bling/vim-bufferline') but that did not work, so I had to quit Vim and delete the directory manually (and uncomment that section in vimrc).

Thanks for considering.

runtimepath only including certain

Hi,
Using nvim on Mac (see config below)with last version of minpac, my runtimepath only includes the plugin installed with minpac that start with the prefix "vim" ? Any idea why ?
I check my ~/.config/nvim/pack/minpac/start all the plugins are there but only those like "vim-textobj-entire", "vim-surround", "vimproc" are referenced in my runtimepath when I do :set runtimepath?
thx,
Godot

       -----------------------------------------------------------------

NVIM v0.2.0
Build type: Release
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNDEBUG -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -I/tmp/neovim-20170707-80027-1bg0wcx/neovim-0.2.0/build/config -I/tmp/neovim-20170707-80027-1bg0wcx/neovim-0.2.0/src -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/tmp/neovim-20170707-80027-1bg0wcx/neovim-0.2.0/build/src/nvim/auto -I/tmp/neovim-20170707-80027-1bg0wcx/neovim-0.2.0/build/include
Compiled by [email protected]

Optional features included (+) or not (-): +acl +iconv +jemalloc +tui
For differences from Vim, see :help vim-differences

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/0.2.0_1/share/nvim"

`minpac#update()` produces too many messages

I find it a bit confusing when minpac#update() mentions each plugin twice. For a new plugin, we get Cloning vim-plugin followed by Updated vim-plugin. For a plugin that's already installed, we get Updating vim-plugin followed by Updated vim-plugin.

verbose-output

Perhaps these messages are useful when developing minpac, but as a minpac user I'd prefer it if the output from minpac#update() was less verbose. I'd suggest removing the echo statements, and keeping only the echom statements. (Or if the echo statements are useful, maybe only enable them with a verbose option?)

Headless install of plugins with Neovim

Hi,

Trying to install plugins in neovim (for a fresh install) using nvim —headless +PackUpdate +q I guess I hit the issue that nvim is exiting before the PackUpdate function is completed.

Is there a way to wait for PackUpdate completion before quitting ?

~ > nvim --headless +PackUpdate +q             
Installed: vim-vinegar
Installed: vim-yaml
Installed: vim-surround
Installed: vim-flatbuffers
Installed: ack.vim
Installed: vim-tmux-navigator
Error while updating "vim-unimpaired".  Error code: 0
Error while updating "tcomment_vim".  Error code: 0
Error while updating "tabular".  Error code: 0
Error while updating "vim-cmake-syntax".  Error code: 0
Error while updating "vim-markdown".  Error code: 0
Error while updating "fzf".  Error code: 0
remote/host: generated rplugin manifest: /home/laurent/.local/share/nvim/rplugin.vim
Error plugins: 6%      

My init.vim :

function! PackInit() abort
        packadd minpac

        call minpac#init()
        call minpac#add('k-takata/minpac', {'type': 'opt'})

        " Additional plugins here.
        call minpac#add('tpope/vim-unimpaired')

        " 'netrw done right' (netrw is the builtin vim directory browser)
        call minpac#add( 'tpope/vim-vinegar')

        " tmux navigator
        call minpac#add( 'christoomey/vim-tmux-navigator')

        " syntax for flatbuffers
        call minpac#add( 'zchee/vim-flatbuffers', {'type':'opt'})

        " syntax for YAML files
        call minpac#add( 'stephpy/vim-yaml',  {'type':'opt'})

        " comment out things
        call minpac#add( 'tomtom/tcomment_vim')

        " for grepping fast
        call minpac#add( 'mileszs/ack.vim')

        " for cmake syntax"
        call minpac#add( 'pboettch/vim-cmake-syntax', {'type':'opt'})

        " surround
        call minpac#add( 'tpope/vim-surround')

        " fuzzy finder
        call minpac#add( 'junegunn/

        " markdown
        call minpac#add( 'godlygeek/tabular',{'type':'opt'})
        call minpac#add( 'plasticboy/vim-markdown',{'type':'opt'})

endfunction

" Define user commands for updating/cleaning the plugins.
" Each of them calls PackInit() to load minpac and register
" the information of plugins, then performs the task.
command! PackUpdate call PackInit() | call minpac#update('', {'do': 'call minpac#status()'})
command! PackClean  call PackInit() | call minpac#clean()
command! PackStatus call PackInit() | call minpac#status()

minpac#update() results in "list index out of range: 0"

Sometimes, when I run :call minpac#update() I get the following error:

  Error detected while processing function minpac#update[2]..minpac#impl#update[35]..<SNR>76_update_single_plugin[34]..<SNR>76_start_job[6]..<lambda>6[1]..<SNR>77_exit_cb[2].  .<
  SNR>76_job_exit_cb[12]..<SNR>76_get_plugin_revision[3]..<SNR>76_system[10]..<lambda>12[1]..<SNR>77_exit_cb[2]..<SNR>76_job_exit_cb[12]..<SNR>76_get_plugin_revision[3]..<SNR  >7
  6_system[10]..<lambda>18[1]..<SNR>77_exit_cb[2]..<SNR>76_job_exit_cb[12]..<SNR>76_get_plugin_revision[3]..<SNR>76_system[10]..<lambda>24[1]..<SNR>77_exit_cb[2]..<SNR>76_job  _e
  xit_cb[12]..<SNR>76_get_plugin_revision[3]..<SNR>76_system[10]..<lambda>42[1]..<SNR>77_exit_cb[2]..<SNR>76_job_exit_cb[12]..<SNR>76_get_plugin_revision[3]..<SNR>76_system[1  0]
  ..<lambda>48[1]..<SNR>77_exit_cb[2]..<SNR>76_job_exit_cb[12]..<SNR>76_get_plugin_revision[3]..<SNR>76_system[10]..<lambda>36[1]..<SNR>77_exit_cb[2]..<SNR>76_job_exit_cb[12]  ..
  <SNR>76_get_plugin_revision:
  line    5:
  E684: list index out of range: 0
  E15: Invalid expression: l:res[1][0]

I'm unfortunately unable to get a reproducible case. But it seems to occur more frequently when there is a big update of a single plugin. Though this time it happened it was when I was sure there are no updates available.

My vimrc:

  " Minpac package manager
  packadd minpac
  call minpac#init()
  call minpac#add('k-takata/minpac', {'type': 'opt'})

  " Mandatory plugins
  call minpac#add('airblade/vim-gitgutter')
  call minpac#add('christoomey/vim-tmux-navigator')
  call minpac#add('easymotion/vim-easymotion')
  call minpac#add('honza/vim-snippets')
  call minpac#add('idanarye/vim-vebugger')
  call minpac#add('jiangmiao/auto-pairs')
  call minpac#add('junegunn/vim-slash')
  call minpac#add('kshenoy/vim-signature')
  call minpac#add('Lokaltog/vim-distinguished')
  call minpac#add('mbbill/undotree')
  call minpac#add('neomake/neomake')
  call minpac#add('Shougo/vimproc.vim', {'do': 'silent! !make'})
  call minpac#add('simeji/winresizer')
  call minpac#add('SirVer/ultisnips')
  call minpac#add('tpope/vim-abolish')
  call minpac#add('tpope/vim-fugitive')
  call minpac#add('tpope/vim-repeat')
  call minpac#add('tpope/vim-surround')
  call minpac#add('tpope/vim-unimpaired')
  call minpac#add('Valloric/YouCompleteMe')
  call minpac#add('wellle/targets.vim')
  call minpac#add('weynhamz/vim-plugin-minibufexpl')
  call minpac#add('lambdalisue/vim-manpager')

  " Optional plugins
  call minpac#add('idanarye/vim-vebugger', {'type': 'opt'})
  call minpac#add('vim-scripts/a.vim', {'type': 'opt'})

My vim is 8.0.0628, but it also happened on 8.0.709.

helptags is not called

Now I have already stumbled several times over the fact that for some reason :helptags isn't called. Simple example, follow your README.md, restart Vim. Try :h minpac nothing happens, however note that the functions minpac#add() are available.

Error while updating "minpac". Error code: 128

First of all, for several week I had no problems with minpac. All works fine until today:
Using neovim, try to run "PackageUpdate" and get the message: "Username for 'https://github.com': ". The status line shows error code 128 and neovim freeze. After I commented out all plugins and run "PackageClean" (no problems) I run "PackageUpdate" again. Now I got the error "Error plugins: 1".

This is my init.vim:

" PLUGINS
  packadd minpac
  call minpac#init()
   
  " minpac must have {'type': 'opt'} so that it can be loaded with `packadd`
 call minpac#add('k-takata/minpac', {'type': 'opt'})
  
 " Add other plugins here
 call minpac#add('vim-airline/vim-airline')
 "call minpac#add('mklabs/split-term.vim')
 "call minpac#add('tpope/vim-commentary')
 "call minpac#add('tpope/vim-dispatch')
 "call minpac#add('radenling/vim-dispatch-neovim')
 "call minpac#add('aimondi/delimitMate')
 "call minpac#add('vifm/neovim-vifm')
 
 command! PackUpdate call minpac#update()
 command! PackClean call minpac#clean()

helptags fails to run properly

The glob pattern in s:is_helptags_old uses the {} alternation pattern which doesn't seem to be supported by glob.
I tried to search the documentation and tried with both vim8 and neovim but with no success.
The glob function just returns an empty list.

I solved the problem by splitting the alternation like:
let l:txts = glob(a:dir . '/*.txt', 1, 1) + glob(a:dir . '/*.[a-z][a-z]x', 1, 1)

Am I missing something?

call minpac#status() not working anymore?

I have this

command! -bar PackUpdate call plugins#init() | call minpac#update('', {'do': 'call minpac#status()'})

And I did update my plugins last week & after that, it doesn't show any info anymore

Update and clean broken in the last commits (master branch)

hi, i stumbled into this today trying to update plugins:

call minpac#update()

Messages maintainer: Bram Moolenaar <[email protected]>
Error detected while processing function minpac#update:
line    2:
E119: Not enough arguments for function: minpac#impl#update
Press ENTER or type command to continue

same issue with clean:

call minpac#clean()
Error detected while processing function minpac#clean:
line    2:
E119: Not enough arguments for function: minpac#impl#clean

i checked the runtest_upstream branch and its ok, seems to not present the issue. probably something in the latest commits, i haven't had the time to check.

Following the OS info (Ubuntu 18.04)

❯ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 10 2018 21:31:58)
Included patches: 1-1453
Modified by [email protected]
Compiled by [email protected]
Huge version with GTK2 GUI.  Features included (+) or not (-):
+acl               +farsi             +mouse_sgr         -tag_any_white
+arabic            +file_in_path      -mouse_sysmouse    +tcl
+autocmd           +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
+balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
+browse            +fork()            -mzscheme          +textobjects
++builtin_terms    +gettext           +netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          +toolbar
+cindent           +insert_expand     +path_extra        +user_commands
+clientserver      +job               +perl              +vertsplit
+clipboard         +jumplist          +persistent_undo   +virtualedit
+cmdline_compl     +keymap            +postscript        +visual
+cmdline_hist      +lambda            +printer           +visualextra
+cmdline_info      +langmap           +profile           +viminfo
+comments          +libcall           -python            +vreplace
+conceal           +linebreak         +python3           +wildignore
+cryptv            +lispindent        +quickfix          +wildmenu
+cscope            +listcmds          +reltime           +windows
+cursorbind        +localmap          +rightleft         +writebackup
+cursorshape       +lua               +ruby              +X11
+dialog_con_gui    +menu              +scrollbind        -xfontset
+diff              +mksession         +signs             +xim
+digraphs          +modify_fname      +smartindent       +xpm
+dnd               +mouse             +startuptime       +xsmp_interact
-ebcdic            +mouseshape        +statusline        +xterm_clipboard
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_save
+eval              +mouse_gpm         +syntax            
+ex_extra          -mouse_jsbterm     +tag_binary        
+extra_search      +mouse_netterm     +tag_old_static    
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -Wdate-time  -g -O2 -fdebug-prefix-map=/build/vim-NQEcoP/vim-8.0.1453=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E  -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.2 -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.26/CORE -lperl -ldl -lm -lpthread -lcrypt  -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm -lruby-2.5 -lpthread -lgmp -ldl -lcrypt -lm     

~/.vim/pack/minpac/opt/minpac master
❯ uname -a
Linux valerino-desktop-linux 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

my .vimrc

""""""""""""""""""""""""""""""""""""""""""""
" minpac vim8 plugin manager
""""""""""""""""""""""""""""""""""""""""""""
set packpath^=~/.vim
packadd minpac
if exists('*minpac#init')
	call minpac#init({'verbose':4})

	" minpac must have {'type': 'opt'} so that it can be loaded with `packadd`.
	call minpac#add('k-takata/minpac', {'type': 'opt'})
	
	" Add other plugins here.

	" ctags management
	call minpac#add('ludovicchabant/vim-gutentags')
	
	" nerdtree
	call minpac#add('scrooloose/nerdtree')
	
	" nerdtree git
	call minpac#add('Xuyuanp/nerdtree-git-plugin')
	
	" unix helpers
	call minpac#add('tpope/vim-eunuch')

	" visualize git changes
	call minpac#add('airblade/vim-gitgutter')
	
	" sublime style multiple cursors
	call minpac#add('terryma/vim-multiple-cursors')
	
	" surround with brackets, quotes, ....
	call minpac#add('tpope/vim-surround')
	
	" asynchronous lint engine
	call minpac#add('w0rp/ale')

	" to copy line with line numbers with c-y
	call minpac#add('ujihisa/nclipper.vim')

	" vim comment plugin
	call minpac#add('tyru/caw.vim')

	" maralla completor
	call minpac#add('maralla/completor.vim')

	" tab completions
	call minpac#add('ervandew/supertab')

	" snippets
	call minpac#add('SirVer/ultisnips')

	" auto brackets/parens/...
	call minpac#add('jiangmiao/auto-pairs')

	" vim defaults
	call minpac#add('tpope/vim-sensible')
	
	" vinegar netrw extension
	call minpac#add('tpope/vim-vinegar')

	" ctrlP fuzzy search
	call minpac#add('ctrlpvim/ctrlp.vim')

	" lightline
	call minpac#add('itchyny/lightline.vim')

	" tagbar
	call minpac#add('majutsushi/tagbar')

	" ultisnips
	call minpac#add('SirVer/ultisnips')
	call minpac#add('honza/vim-snippets')

	" dracula theme
	call minpac#add('dracula/vim')

	" autoformat
	call minpac#add('Chiel92/vim-autoformat')

	" fugitive git plugin
	call minpac#add('tpope/vim-fugitive')

	" golang integration
	call minpac#add('fatih/vim-go')

	" startify startup page
	call minpac#add('mhinz/vim-startify')

	" markdown integration
	call minpac#add('plasticboy/vim-markdown')


	" remap esc to handle shitty touchbar on mbp
	call minpac#add('zhou13/vim-easyescape')
	
	" Load the plugins right now. (optional)
	" packloadall
	
	" set commands
	command! PackUpdate packadd minpac | source ~/.vimrc | call minpac#update()
	command! PackClean  packadd minpac | source ~/.vimrc | call minpac#clean()
endif

"""""""""""""""""""""""""""""""""""""""""""""""
" builtin
"""""""""""""""""""""""""""""""""""""""""""""""
" set color
color dracula
let g:dracula_colorterm = 0

" encoding utf8
set enc=utf-8

" show line numbers
set number

" open split in right pane
set splitright

" share clipboard with host
if has('mac')
	set clipboard=unnamed
elseif has('unix')
	set clipboard=unnamedplus
endif

" fix backspace
set backspace=indent,eol,start

" hilight search, hit enter to turn off hilight then
set hlsearch
noremap <CR> :noh<CR><CR>

" map esc to jk/kj in insert mode
let g:easyescape_chars = { "j": 1, "k": 1 }
let g:easyescape_timeout = 100
cnoremap jk <ESC>
cnoremap kj <ESC>

" set tabs=4
set tabstop=4
set shiftwidth=4
"set expandtab

" allows to switch between buffers without saving first
set hidden

" enable mouse
set mouse=a

" enable pasting multiple times (paste, reselect, recopy)
xnoremap p pgvy

" filetype
filetype plugin on

" do not screw makefiles
autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=0

" autorefresh vimrc
autocmd! bufwritepost .vimrc source %

"""""""""""""""""""""""""""""""""""""""""""""""
" ultisnips
"""""""""""""""""""""""""""""""""""""""""""""""
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
"let g:UltiSnipsExpandTrigger="<tab>"
"let g:UltiSnipsJumpForwardTrigger="<c-b>"
"let g:UltiSnipsJumpBackwardTrigger="<c-z>"

" If you want :UltiSnipsEdit to split your window.
"let g:UltiSnipsEditSplit="vertical"

"""""""""""""""""""""""""""""""""""""""""""""""
" tagbar
"""""""""""""""""""""""""""""""""""""""""""""""
" open tagbar with f8
nmap <F8> :TagbarToggle<CR>

"""""""""""""""""""""""""""""""""""""""""""""""
" autoformat
"""""""""""""""""""""""""""""""""""""""""""""""
"au BufWrite *.c,*.cpp,*.h,*.hpp,*.m,*.mm,*.go,*.sh :Autoformat

"""""""""""""""""""""""""""""""""""""""""""""""
" maralla completor
"""""""""""""""""""""""""""""""""""""""""""""""
let g:completor_python_binary='python3'
let g:completor_clang_binary='clang'
let g:completor_gocode_binary = 'gocode'

" parameters always visible :)
let g:completor_auto_close_doc = '0'

" visual studio alike (cycle with cursor, select with tab)
"imap <expr> <Tab> pumvisible() ? "\<C-y><esc>%<esc>" : "\<Tab>"

" plays nice with ultisnips, select snippet with Enter
let g:UltiSnipsExpandTrigger = "<nop>"
inoremap <expr> <CR> pumvisible() ? "<C-R>=UltiSnips#ExpandSnippetOrJump()<CR>" : "\<CR>"

" last but not least, tab switches among parameters after completion
"map <tab> <Plug>CompletorCppJumpToPlaceholder<esc>

""""""""""""""""""""""""""""""""""""""""""""""""
" supertab
""""""""""""""""""""""""""""""""""""""""""""""""
let g:SuperTabCrMapping=1

""""""""""""""""""""""""""""""""""""""""""""""""
" ctrlp
""""""""""""""""""""""""""""""""""""""""""""""""
" open with esc-esc
let g:ctrlp_map = '<c-p>'
map <C-g> :CtrlPTag<CR>
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_show_hidden=1
let g:ctrlp_open_new_file = 'v'
let g:ctrlp_match_window_bottom=1
let g:ctrlp_max_height=25
let g:ctrlp_clear_cache_on_exit=0
set wildignore+=*/tmp/*,*.so,*.swp,*.zip
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'

""""""""""""""""""""""""""""""""""""""""""""""""
" builtin netrw
""""""""""""""""""""""""""""""""""""""""""""""""
"let g:netrw_banner = 0
"let g:netrw_liststyle = 3
"let g:netrw_altv=1
"let g:netrw_preview = 1
"let g:netrw_alto = 0
"let g:netrw_list_hide='.*\.swp$'
"let g:netrw_browse_split = 4
"let g:netrw_winsize = 25
"let g:netrw_chgwin = winnr()

""""""""""""""""""""""""""""""""""""""""""""""""
" nerdtree
""""""""""""""""""""""""""""""""""""""""""""""""
autocmd StdinReadPre * let s:std_in=1

" auto-open nerdtree
autocmd VimEnter *
                 \   if !argc()
                 \ |   Startify
                 \ |   NERDTree
                 \ |   wincmd w
                 \ | endif
 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif

" close vim if nerdtree is the only remained window
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

" toggle nerdtree with CTRL-t
map <C-t> :NERDTreeToggle<CR>

""""""""""""""""""""""""""""""""""""""""""""""""
" lightline
""""""""""""""""""""""""""""""""""""""""""""""""
set laststatus=2
let g:lightline = {
\ 'colorscheme': 'Dracula',
\   'active': {
\     'left':[ [ 'mode', 'paste' ],
\              [ 'gitbranch', 'readonly', 'filename', 'modified' ]
\     ]
\   },
\   'component': {
\     'lineinfo': 'L: %3l:%-2v',
\   },
\   'component_function': {
\     'gitbranch': 'fugitive#head',
\   }
\}

Error while updating "minpac". Error code: 129

I'm setting up minpac on a fresh neovim installation

Here's my init.vim:

packadd minpac
call minpac#init()
call minpac#add('k-takata/minpac', {'type': 'opt'})

When I source the init.vim and run :call minpac#update() I get the following error:

Error while updating "minpac". Error code: 129

neovim version:

NVIM v0.2.3-610-ga6052c7
Build type: Release
LuaJIT 2.0.5

:checkhealth output
checkhealth.txt

Better update check

Currently minpac shows a message Updated: <plugin-name> when git pull succeeds.
This means that the message is shown even the plugin is not actually updated.
The :helptag command is also executed at the same time.

Is there a good way to check if a plugin is actually updated?
Perhaps git rev-parse HEAD should be used before and after git pull?

Display changelog of updated plugins

I wonder if it's possible to list the changes of the updated plugins on update:

cbdf10a Fix #573 - Update the README to recommend installing via the built-in package system
0b50ebb Fix #779 - Handle empty output for tslint
235fc90 Fix #308 - Check Dart files with dartanalyzer
aa94d09 Fix #710 - Show hlint suggestions as info items, and include end line and column numbers
5a6ffc2 Add a missing test file

Set default type in init

It could be useful to set the default type ('start' or 'opt') in minpac#init to reduce verbosity if a majority of added packages would to be of type 'opt'? Eg.

call minpac#init({'package_name': 'bundle'})
call minpac#add('k-takata/minpac', {'type': 'opt'})

Would be the same as:

call minpac#init({'package_name': 'bundle', 'default_type': 'opt'})
call minpac#add('k-takata/minpac')

Should minpac work for themes?

It not, that's cool. However, if you think it should, then it doesn't work. It detects the themes but the colors aren't properly applied.

Importing molokai theme using minpac

image

Sourcing the molokai theme manually

image

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.