zoukankan      html  css  js  c++  java
  • MAC vim安装gruvbox主题

    gruvbox是一款优秀的vim配色方案,但是却不是vim自带的配色方案,这里记录一下安装过程。

    gruvbox官网:https://github.com/morhetz/gruvbox

    gruvbox安装说明:https://github.com/morhetz/gruvbox/wiki/Installation

    vim插件管理工具有vim-plug和vundle等,这两者任意使用一种即可。

    1、使用vim-plug安装

    官网:https://github.com/junegunn/vim-plug

    首先安装vim-plug,安装命令:

    # Vim (~/.vim/autoload)
    curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

    然后在~/.vimrc中添加如下配置

    call plug#begin()
    Plug 'morhetz/gruvbox'
    call plug#end()
    colorscheme gruvbox
    set background=dark

    然后在vim中执行:PlugInstall 安装gruvbox即可。

    安装完后执行:source %生效.vimrc配置文件

    2、使用vundle安装

    vundle官网:https://github.com/VundleVim/Vundle.vim

    首先安装vundle,安装命令:

    git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

    然后配置~/.vimrc

    set nocompatible              " be iMproved, required
    filetype off                  " required
    
    set rtp+=~/.vim/bundle/Vundle.vim
    call vundle#begin()
    
    Plugin 'VundleVim/Vundle.vim'
    
    call vundle#end()            " required
    filetype plugin indent on    " required
    
    Plugin 'morhetz/gruvbox'
    
    set bg=dark                     "设置背景为黑色
    colorscheme gruvbox             "设置主题为 gruvbox
    set guioptions=                 "去掉两边的scrollbar
    set guifont=Monaco:h17          "设置字体和字的大小

    保存配置:w并执行:PluginInstall安装gruvbox,安装完成后:source %生效.vimrc配置文件即可。

  • 相关阅读:
    String
    Array常用方法
    Array类
    ruby调试/练习时的小技巧
    集合类对象的遍历处理办法
    Tech road one step 7-Noc to 13-Nov
    Tech road one step 31-Oct 6-Nov
    TechRoad_oneStep_17-23 10
    TechRoad_oneStep_1001
    TechRoad_oneStep_0919
  • 原文地址:https://www.cnblogs.com/snowater/p/9520864.html
Copyright © 2011-2022 走看看