一、簡介
spf13-vim是Vim外掛程式與配置的一個發行版本,包含了一整套精心挑選的Vim外掛程式,採用Vundle進行外掛程式管理,並且可以通過下列檔案進行個人化配置
~/.vimrc.local #個人化設定檔~/.vimrc.bundles.local #本地bundle設定檔 ~/.vimrc.before.local #早於spf13-vim載入的個人化設定檔
參考:https://github.com/spf13/spf13-vim#fork-customization
二、安裝
下面介紹兩種安裝方式
方式1:執行如下命令,即可完成安裝
curl https://j.mp/spf13-vim3 -L > spf13-vim.sh && sh spf13-vim.sh
方式2:通過檔案:bootstrap.sh,步驟如下
1、建立目錄與檔案,如下:
mkdir spf13-vimcd spf13-vimvim bootstrap.shchmod +x bootstrap.sh./bootstrap.sh
檔案:bootstrap.sh ,內容如下
#!/usr/bin/env bash# Copyright 2014 Steve Francia## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.############################ SETUP PARAMETERSapp_name='spf13-vim'app_dir="$HOME/.spf13-vim-3"[ -z "$git_uri" ] && git_uri='https://github.com/spf13/spf13-vim.git'git_branch='3.0'debug_mode='0'fork_maintainer='0'[ -z "$VUNDLE_URI" ] && VUNDLE_URI="https://github.com/gmarik/vundle.git"############################ BASIC SETUP TOOLSmsg() { printf '%b\n' "$1" >&2}success() { if [ "$ret" -eq '0' ]; then msg "\e[32m[]\e[0m ${1}${2}" fi}error() { msg "\e[31m[✘]\e[0m ${1}${2}" exit 1}debug() { if [ "$debug_mode" -eq '1' ] && [ "$ret" -gt '1' ]; then msg "An error occurred in function \"${FUNCNAME[$i+1]}\" on line ${BASH_LINENO[$i+1]}, we're sorry for that." fi}program_exists() { local ret='0' type $1 >/dev/null 2>&1 || { local ret='1'; } # throw error on non-zero return value if [ ! "$ret" -eq '0' ]; then error "$2" fi}variable_set() { if [ -z "$1" ];