码迷,mamicode.com
首页 > 系统相关 > 详细

MAC vim安装gruvbox主题

时间:2018-08-23 00:21:04      阅读:2225      评论:0      收藏:0      [点我收藏+]

标签:ati   filetype   vbo   plugin   说明   off   url   官网   begin   

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配置文件即可。

 

MAC vim安装gruvbox主题

标签:ati   filetype   vbo   plugin   说明   off   url   官网   begin   

原文地址:https://www.cnblogs.com/snowater/p/9520864.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!