James Patrick
8bce4295c8
There's a lot of cruft built up over my years of using vim & with the introduction of Doom Emacs what I use vim for has gotten more pointed as well. Vim now services as a quick in and out tool for dropping to the commandline on local or remote machines. So quick rundown on changes. - Removed weird hallow sourcing in vimrc - Removed unused or under used Plugs. - Switched from ctrl+p to fzf. - Switched to ALE for linting and formatting - Configuration and keybinds now lives with the Plugs. Intended one level under it. - The large boilerplate sane default file has been extracted into sensible.vim. This based on tpope's config. - Make will no longer symlink .dotfile/vim to ~/.vim. This was causing lots of unversioned cruff to pile up in the project. Instead it will now symlink all the things needed. - Make update will now run PlugClean as well.
41 lines
1.1 KiB
Makefile
41 lines
1.1 KiB
Makefile
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
TARGET_DIR := ~/.vim
|
|
PLUG_URL := https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
PLUG_PATH := $(SRC_DIR)/autoload/plug.vim
|
|
|
|
include ../lib/shared.mk
|
|
|
|
install: | init update
|
|
|
|
init:
|
|
if (( $$+commands[vim] )) ; then
|
|
$(report) header "Setting up vim"
|
|
mkdir -p $(TARGET_DIR)
|
|
$(mk_link) $(SRC_DIR)/vimrc ~/.vimrc
|
|
$(mk_link) $(SRC_DIR)/vimrc.d $(TARGET_DIR)/vimrc.d
|
|
$(mk_link) $(SRC_DIR)/spell $(TARGET_DIR)/spell
|
|
( mkdir -p $(TARGET_DIR)/backup \
|
|
&& chmod 700 $(TARGET_DIR)/backup ) \
|
|
; $(report) "setting up backup dir"
|
|
else
|
|
$(report) warn "cannot find vim?"
|
|
fi
|
|
|
|
update:
|
|
if (( $$+commands[vim] )) ; then
|
|
$(report) header "Upgrading vim"
|
|
curl -fsLo $(PLUG_PATH) $(PLUG_URL) \
|
|
; $(report) "vim plug setup"
|
|
vim +PlugInstall +PlugUpdate +PlugClean +qall \
|
|
; $(report) "downloading/updating plugins"
|
|
stty sane # dropping in & out causes some weird tty behavior.
|
|
else
|
|
$(report) warn "cannot find vim?"
|
|
fi
|
|
|
|
|
|
remove:
|
|
$(report) header "Removing vim config"
|
|
$(rm_link) ~/.vimrc
|
|
$(rm_link) $(TARGET_DIR)
|