Skip to content
/ dein.vim Public
forked from Shougo/dein.vim

⚡ Dark powered Vim/Neovim plugin manager

License

Notifications You must be signed in to change notification settings

zsaw/dein.vim

 
 

Repository files navigation

Dein.vim

Gitter GitHub release (latest by date) GitHub issues

Dein.vim is a dark powered Vim/Neovim plugin manager.

To learn more details, visit here.

Table of contents

Features

  • Fast - Faster than NeoBundle.
  • Simple - Function API and familiar patterns, without commands or dependency hell.
  • Async - Clean asynchronous installation supported.
  • Extendable - Supports plugins from local or remote sources, and also Non-Github plugins.
  • Consistent - Go-like directory structure (eg. github.com/{author}/{repository})
  • Practical - Automatically merge plugins directories to avoid long runtimepath

Getting started

Prerequisites

  • Vim (v8.2 or higher) or NeoVim (v0.5.0 or higher)
  • Git should be installed (v2.4.11 or higher)
  • xcopy installed or Python3 interface (on Windows)

Note: If you use Vim (lower than 8.2) or NeoVim (lower than 0.5), please use dein.vim v2.2 instead.

Basic installation

To install dein.vim on UNIX systems, you should run the install script. To do that, you may either download and run the script manually, or use the following wget or curl command:

Wget

sh -c "$(wget -O- https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh)"

Curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh)"

Manual inspection

Note: "It's a good idea to inspect the install script from projects you don't know."

You can do that by downloading the install script, then looking through it to check if the code is safe:

$ wget https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh
$ less installer.sh
$ sh installer.sh

The script code is well formatted, so you can better understand all the code. The script can take some arguments that are listed in Additional Notes section below.

Additional Notes

  • If you want to overwrite an existent .vimrc or init.vim config, pass the --overwrite-config (or in short -oWC) argument to the installation script. By default, if there's one config already, the new config is generated inside the base path.

  • The installer script has prompt menus that helps you setup everything. However, if you want install Dein.vim into an different path location, pass the location to the end of the script like sh installer.sh ~/.vim/bundle.

  • If you want to complete the setup without the installer script prompting, Select your editor config location and pass the --use-vim-config (or in short -uVC) or --use-neovim-config (or in short -uNC) argument to the installation script.

Powershell (Windows)

The support for Windows requires Powershell.

Open your Powershell and download the script:

Invoke-WebRequest https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.ps1 -OutFile installer.ps1

After checking the code, allow it to be executed properly:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Lastly, for an installation at the ~/.cache/dein directory execute:

./installer.ps1 ~/.cache/dein

Config example

Show a UNIX installation example using "~/.cache/dein" as the base path location.
" Ward off unexpected things that your distro might have made, as
" well as sanely reset options when re-sourcing .vimrc
set nocompatible

" Set dein base path (required)
let s:dein_base = '~/.cache/dein/'

" Set dein source path (required)
let s:dein_src = '~/.cache/dein/repos/github.com/Shougo/dein.vim'

" Set dein runtime path (required)
set runtimepath+=s:dein_src

" Call dein initialization (required)
call dein#begin(s:dein_base)

call dein#add(s:dein_src)

" Your plugins go here:
"call dein#add('Shougo/neosnippet.vim')
"call dein#add('Shougo/neosnippet-snippets')

" Finish dein initialization (required)
call dein#end()

" Attempt to determine the type of a file based on its name and possibly its
" contents. Use this to allow intelligent auto-indenting for each filetype,
" and for plugins that are filetype specific.
if has('filetype')
  filetype indent plugin on
endif

" Enable syntax highlighting
if has('syntax')
  syntax on
endif

" Uncomment if you want to install not-installed plugins on startup.
"if dein#check_install()
" call dein#install()
"endif

Q&A

Dein has an user interface like vim-plug?

Feedback

Tasks

This is where Dein future plans or TODOS are listed:

  • Other types support (zip, svn, hg, ...)
  • Metadata repository support

License

Licensed under the MIT license.

About

⚡ Dark powered Vim/Neovim plugin manager

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vim Script 93.6%
  • Shell 3.5%
  • Python 1.4%
  • Other 1.5%