https://github.com/junegunn/vim-plug
Type the following command:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
For Windows, type the following command:
iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | ni $HOME/vimfiles/autoload/plug.vim -Force
Add/Create a vim-plug section to your ~/.vimrc
.
Example
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
" Any valid git URL is allowed
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
" Multiple Plug commands can be written in a single line using | separators
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Using a non-default branch
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
Plug 'fatih/vim-go', { 'tag': '*' }
" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
" Unmanaged plugin (manually installed and updated)
Plug '~/my-prototype-plugin'
" Initialize plugin system
call plug#end()
Reload .vimrc
and type :PlugInstall
in vim to install plugins.
The NERDTree is a file system explorer for the Vim editor. Using this plugin, users can visually browse complex directory hierarchies, quickly open files for reading or editing, and perform basic file system operations.
call plug#begin('~/.vim/plugged')
Plug 'preservim/nerdtree'
call plug#end()
" Automatic start nerdtree
autocmd VimEnter * NERDTree
" Start NERDTree and put the cursor back in the other window.
autocmd VimEnter * NERDTree | wincmd p
Use Ctrl + w and left/right arrow to switch between windows.
Use Ctrl + w and Ctrl + o to close the other window.
call plug#begin('~/.vim/plugged')
Plug 'morhetz/gruvbox'
call plug#end()
" Automatic enable theme
colorscheme gruvbox
Type the following command into ~/.vimrc
set tabstop=4
set shiftwidth=4
" Show Line Number
set nu
" Set Auto Indent
set ai
" Attach mouse, you can choose with mouse
" Use Ctrl+Insert to copy and Shift+Insert to paste
set mouse=a
To use terminal in vim, type :term
.
Type the following command into ~/.vimrc
set splitbelow
set termwinsize=15x0
https://wiki.archlinux.org/title/Vim/YouCompleteMe#Installation