VimPlugin: vim-plug: Difference between revisions

From wikinotes
Line 11: Line 11:


= Configuration =
= Configuration =
<blockquote>
== Basics ==
<blockquote>
<blockquote>
<source lang="vim">
<source lang="vim">
Line 22: Line 24:
call plug#end()
call plug#end()
</source>
</source>
</blockquote><!-- Basics -->
== Neovim/Loaded Hooks ==
<blockquote>
Most nvim plugins require their configuration to be executed '''after :call plug#end()'''<br>
You can setup autocmds for once plugins have been loaded.
<syntaxhighlight lang="vim">
Plug 'https://github.com/numToStr/Comment.nvim'
autocmd! User Comment.nvim  lua require('Comment').setup()
</syntaxhighlight>
</blockquote><!-- Neovim/Loaded Hooks -->
</blockquote><!-- Configuration -->
</blockquote><!-- Configuration -->



Revision as of 00:26, 15 February 2024

Asynchronous vim plugin manager.

Documentation

github https://github.com/junegunn/vim-plug

Configuration

Basics

call plug#begin('~/.vim/bundle')

Plug 'https://github.com/vim-scripts/DrawIt'
Plug 'ssh://domain.com:/git/foo-plugin'
Plug 'https://domain.com/project', {'branch': 'custom-branch', 'do': ':SomeVimCommand'}
Plug '~/my-prototype-plugin'

call plug#end()

Neovim/Loaded Hooks

Most nvim plugins require their configuration to be executed after :call plug#end()
You can setup autocmds for once plugins have been loaded.

Plug 'https://github.com/numToStr/Comment.nvim'

autocmd! User Comment.nvim  lua require('Comment').setup()

Usage

:PlugInstall  " install plugins
:PlugUpdate   " update plugins