MAC vim安装gruvbox主题

本文介绍如何使用vim-plug和vundle两种插件管理工具安装gruvbox配色方案,包括安装步骤和配置方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

 

转载于:https://www.cnblogs.com/snowater/p/9520864.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值