Browse Source

Make vim plug work right on windows

Taylor Bockman 5 years ago
parent
commit
e2fbe83902
  1. 58
      dotfiles/config/nvim/init.vim

58
dotfiles/config/nvim/init.vim

@ -1,9 +1,13 @@
set fileencoding=utf-8 set fileencoding=utf-8
if empty(glob('~/.config/nvim/autoload/plug.vim')) " I have no idea how to auto-install vim-plug on Windows
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs " so you will have to install it manually.
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim if !(has('win16') || has('win32') || has('win64'))
autocmd VimEnter * PlugInstall | source % if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall | source %
endif
endif endif
call plug#begin('~/.config/nvim/plugged') call plug#begin('~/.config/nvim/plugged')
@ -66,30 +70,28 @@ Plug 'ktvoelker/sbt-vim'
" Org Mode " Org Mode
Plug 'jceb/vim-orgmode' Plug 'jceb/vim-orgmode'
if !has("win32") || !has("win16") "Code Completion
"Code Completion " Post-update hook for YCM
" Post-update hook for YCM " Make sure to sudo pip install neovim before running this
" Make sure to sudo pip install neovim before running this function! BuildYCM(info)
function! BuildYCM(info) if a:info.status == 'installed' || a:info.force
if a:info.status == 'installed' || a:info.force !./install.sh
!./install.sh endif
endif endfunction
endfunction Plug 'Valloric/YouCompleteMe', { 'do': function('BuildYCM') }
Plug 'Valloric/YouCompleteMe', { 'do': function('BuildYCM') }
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/nerdtree' " For nerdtree indicators of what has changed
" For nerdtree indicators of what has changed Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
" For some modern file icons
" For some modern file icons Plug 'ryanoasis/vim-devicons'
Plug 'ryanoasis/vim-devicons'
" Make Vim play nice with tmux
" Make Vim play nice with tmux " Use <c-h> <c-j> <c-k> <c-l>
" Use <c-h> <c-j> <c-k> <c-l> " to move between window panes in tmux or vim
" to move between window panes in tmux or vim Plug 'christoomey/vim-tmux-navigator'
Plug 'christoomey/vim-tmux-navigator'
endif
" Markdown " Markdown
Plug 'godlygeek/tabular' Plug 'godlygeek/tabular'

Loading…
Cancel
Save