vim-plug
advantages:
- installs each plugin in its own directory
- includes commands for plugin installation/update/removal: See the list of commands here
- parallel installation/update of plugins
- faster than
Vundle
vim-plug
installation:
- Run this command in terminal
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- Create the
.vimrc
file in your local dir, if there's none yet
touch ~/.vimrc
- Open the
.vimrc
file and paste:
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" List here the plugins with Plug commands
" Shorthand notations can be used, as well as any valid GIT URLs
" Make sure you use single quotes
" See all possible ways to list a plugin: https://github.com/junegunn/vim-plug
" Ex: Plug 'https://github.com/username/reponame.git'
" Initialize the plugin system
call plug#end()
npm install -g typescript
- Open
~/.vimrc
file - Add
Plug 'https://github.com/leafgarland/typescript-vim'
beforecall plug#end()
- Also add the following lines after
call plug#end()
to enable the plugin to display compilation errors in the QuickFix window:
let g:typescript_compiler_binary = 'tsc'
let g:typescript_compiler_options = ''
autocmd QuickFixCmdPost [^l]* nested cwindow
autocmd QuickFixCmdPost l* nested lwindow
- Open vim and type
:PlugInstall
- Open a
.ts
file with vim:vim someFile.ts
- Run
:make
while editing a TypeScript file to execute thetsc
compiler and display errors in the QuickFix window:
- Open
~/.vimrc
file - Add
Plug https://github.com/Quramy/vim-js-pretty-template
- Add the following lines at the end of the file:
autocmd FileType typescript JsPreTmpl html
autocmd FileType typescript syn clear foldBraces
- Open vim and type
:PlugInstall
FIXME: throws E488 trailing characters error when opening .ts
files
- Open
~/.vimrc
file - Add
Plug https://github.com/pangloss/vim-javascript
- Open vim and type
:PlugInstall
- Open
~/.vimrc
file - Add
Plug 'https://github.com/Shougo/vimproc.vim', {'do' : 'make'}
- Add
Plug 'https://github.com/Quramy/tsuquyomi'
- Open vim and type
:PlugInstall
- Open
~.vimrc
file - Add
Plug 'https://github.com/Valloric/YouCompleteMe'
- Open vim and type
:PlugInstall
line 4:
Exception MemoryError: MemoryError() in <module 'threading' from '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.pyc'> ignored
Segmentation fault: 11
do the following:
brew install vim --with-lua --with-override-system-vi
- Restart terminal
- See comments:
- Open
~/.vimrc
- Add
Plug 'https://github.com/vim-syntastic/syntastic'
- Add the following lines at the end of the file:
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:tsuquyomi_disable_quickfix = 1
let g:syntastic_typescript_checkers = ['tsuquyomi']
- Open vim and type
:PlugInstall
- Add
Plugin 'https://github.com/editorconfig/editorconfig-vim'