vim通用外掛程式SPF13-VIM安裝與使用

來源:互聯網
上載者:User

一、簡介

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" ]; 
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.