mirror of
https://github.com/spf13/spf13-vim.git
synced 2024-09-21 07:27:11 +00:00
Merge pull request #777 from bronzehedwick/patch-1
Preliminary support for neovim
This commit is contained in:
commit
748e494153
24
bootstrap.sh
24
bootstrap.sh
@ -47,10 +47,21 @@ debug() {
|
||||
|
||||
program_exists() {
|
||||
local ret='0'
|
||||
type $1 >/dev/null 2>&1 || { local ret='1'; }
|
||||
command -v $1 >/dev/null 2>&1 || { local ret='1'; }
|
||||
|
||||
# fail on non-zero return value
|
||||
if [ "$ret" -ne 0 ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
program_must_exist() {
|
||||
program_exists $1
|
||||
|
||||
# throw error on non-zero return value
|
||||
if [ ! "$ret" -eq '0' ]; then
|
||||
if [ "$?" -ne 0 ]; then
|
||||
error "You must have '$1' installed to continue."
|
||||
fi
|
||||
}
|
||||
@ -115,6 +126,11 @@ create_symlinks() {
|
||||
lnif "$source_path/.vimrc.before" "$target_path/.vimrc.before"
|
||||
lnif "$source_path/.vim" "$target_path/.vim"
|
||||
|
||||
if program_exists "nvim"; then
|
||||
lnif "$source_path/.vim" "$target_path/.nvim"
|
||||
lnif "$source_path/.vimrc" "$target_path/.nvim/nvimrc"
|
||||
fi
|
||||
|
||||
touch "$target_path/.vimrc.local"
|
||||
|
||||
ret="$?"
|
||||
@ -160,8 +176,8 @@ setup_vundle() {
|
||||
|
||||
############################ MAIN()
|
||||
variable_set "$HOME"
|
||||
program_exists "vim"
|
||||
program_exists "git"
|
||||
program_must_exist "vim"
|
||||
program_must_exist "git"
|
||||
|
||||
do_backup "$HOME/.vim" \
|
||||
"$HOME/.vimrc" \
|
||||
|
Loading…
Reference in New Issue
Block a user