I'm pretty new to Vim and vim-plug and I can't get the latter to install my plugins.
I think I've set everything up—see my files below. But when I start Vim and enter :PlugStatus
, it shows a blank list. :PlugInstall
returns No plugin to install
.
Can somebody tell me what I'm doing wrong?
Context
- Mac OS X 10.11.6
- Vim 8.0.2
- I don't know how vim-plug is versioned, but
:PlugUpgrade
returnsvim-plug is already up-to-date
- git 2.7.4 (Apple Git-66)
:ruby puts RUBY_VERSION
:2.3.1
:python import platform; print(platform.python_version())
:2.7.12
Files:
.vimrc
:
(note the last line)
syntax on
filetype plugin indent on
set relativenumber
set number
" searching
set incsearch
set hlsearch
set ignorecase
set smartcase
" backspace over everything
set backspace=indent,eol,start
" number of spaces inserted by tab
set shiftwidth=4
" status line
hi User1 ctermbg=gray ctermfg=black
hi User2 ctermbg=gray ctermfg=red cterm=bold
set laststatus=2
set statusline= "reset statusline
set statusline+=%1* "black on gray
set statusline+=%F "full filename
" set statusline+=[%{strlen(&fenc)?&fenc:'none'}, "file encoding
" set statusline+=%{&ff}] "file format
set statusline+=\ %y "filetype
set statusline+=\ %h "help file flag
set statusline+=\ %2* "white on red
set statusline+=%m "modified flag
set statusline+=%1* "black on gray
set statusline+=\ %r "read only flag
set statusline+=%= "left/right separator
set statusline+=%c, "cursor column
set statusline+=%l/%L "cursor line/total lines
set statusline+=\ \ %P "percent through file
" load vim-plug
source ~/.vim/.plug.vim
.vim.plug
:
" plug
" Config for vim-plug
" https://github.com/junegunn/vim-plug
" install vim-plug if we don't already have it
if empty(glob('~/.vim/autoload/plug.vim'))
" ensure directories exist
execute '!mkdir -p ~/.vim/autoload'
execute '!mkdir -p ~/.vim/plugged'
" download vim-plug
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall | source ~/.vim/.plug.vim
endif
call plug#begin('~/.vim/plugged')
" Defaults everyone can agree on
Plug 'tpope/vim-sensible'
" quoting/parenthesizing made simple
Plug 'tpope/vim-surround'
" syntax highlighting
Plug 'tomvanderlee/vim-kerboscript', { 'for': 'kerboscript' }
call plug#begin()
" ANSWER: ^^^^^ that should be `end`!
.plug.vim
. Copypasta error.