forked from rafi/vim-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (25 loc) · 874 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
SHELL = /bin/bash
nvim ?= nvim
nvim_version := '${shell $(nvim) --version}'
XDG_DATA_HOME ?= $(HOME)/.local/share
VIM_DATA_HOME = $(XDG_DATA_HOME)/nvim
default: install
install: create-dirs update-plugins
update: update-repo update-plugins
upgrade: update
create-dirs:
@mkdir -vp ./spell "$(VIM_DATA_HOME)"/{backup,sessions,swap,undo,vsnip}
update-repo:
git pull --ff --ff-only
update-plugins:
$(nvim) -V1 -es -i NONE -N --noplugin -u config/init.vim \
-c "try | call dein#clear_state() | call dein#update() | finally | messages | qall! | endtry"
uninstall:
rm -rf "$(VIM_DATA_HOME)"/dein
test:
$(info Testing NVIM 0.5.0+...)
$(if $(shell echo "$(nvim_version)" | egrep "NVIM v0\.[5-9]"),\
$(info OK),\
$(error .. You need Neovim 0.5.0 or newer))
@echo All tests passed, hooray!
.PHONY: install create-dirs update-repo update-plugins uninstall test