在安装vim插件之前,首先安装Vundle插件,用来管理vim插件,安装方法查看Vundle在github上的指南。在安装vundle的时候出现了一个错误E117:unknown function vundle#installer#new。造成这个的原因是因为我的.vimrc里面的内容,所以我新建了一个干净的.vimrc文件后就可以了。

然后去solarized在github上的仓库,按照教程安装solarized。

solarized插件安装好后,由于终端不支持这些配色方案。所以颜色效果和solarized官方网站截图效果差别很大。

此时需要对终端的配色方案进行调整,调整方法参考了Using Solarized colors with vim, Eclipse and Ubuntu这篇文章。

Gnome Terminal

将下面的代码保存到.sh文件中,

 #!/bin/sh
#
# Shell script that configures gnome-terminal to use solarized theme
# colors. Written for Ubuntu 11.10, untested on anything else.
#
# Solarized theme: http://ethanschoonover.com/solarized
#
# Adapted from these sources:
# https://gist.github.com/1280177
# http://xorcode.com/guides/solarized-vim-eclipse-ubuntu/ case "$1" in
"dark")
PALETTE="#070736364242:#D3D301010202:#858599990000:#B5B589890000:#26268B8BD2D2:#D3D336368282:#2A2AA1A19898:#EEEEE8E8D5D5:#00002B2B3636:#CBCB4B4B1616:#58586E6E7575:#65657B7B8383:#838394949696:#6C6C7171C4C4:#9393A1A1A1A1:#FDFDF6F6E3E3"
BG_COLOR="#00002B2B3636"
FG_COLOR="#65657B7B8383"
;;
"light")
PALETTE="#EEEEE8E8D5D5:#D3D301010202:#858599990000:#B5B589890000:#26268B8BD2D2:#D3D336368282:#2A2AA1A19898:#070736364242:#FDFDF6F6E3E3:#CBCB4B4B1616:#9393A1A1A1A1:#838394949696:#65657B7B8383:#6C6C7171C4C4:#58586E6E7575:#00002B2B3636"
BG_COLOR="#FDFDF6F6E3E3"
FG_COLOR="#838394949696"
;;
*)
echo "Usage: solarize [light | dark]"
exit
;;
esac gconftool- --set "/apps/gnome-terminal/profiles/Default/use_theme_background" --type bool false
gconftool- --set "/apps/gnome-terminal/profiles/Default/use_theme_colors" --type bool false
gconftool- --set "/apps/gnome-terminal/profiles/Default/palette" --type string "$PALETTE"
gconftool- --set "/apps/gnome-terminal/profiles/Default/background_color" --type string "$BG_COLOR"
gconftool- --set "/apps/gnome-terminal/profiles/Default/foreground_color" --type string "$FG_COLOR"

然后chmod +x solarized.sh赋予执行权限,命令行下执行./solarized dark,参数可选择dark 或者 light。

之后再用vim打开文件配色效果就和官网截图的一样了。

ubuntu14.04设置terminal配色方案以配合使用vim的Solarized插件的更多相关文章

  1. Vim以及Terminal 配色方案---"Solarized"配色

    linux用户给vim 以及terminal的配色方案---Solarized配色 官网地址:http://ethanschoonover.com/solarized 看这配色:八卦乾坤,赏心悦目,高 ...

  2. Ubuntu14.04 设置wifi热点

    Ubuntu14.04 设置wifi热点 $ sudo add-apt-repository ppa:nilarimogard/webupd8 $ sudo apt-get update $ sudo ...

  3. Ubuntu14.04设置开机自启动程序

    启动应用程序可以帮助我们选择开机启动项.但是在Ubuntu14.04通过Dash输入startup 找不到启动应用程序了,可以通过在控制台输入以下内容: gnome-session-propertie ...

  4. Ubuntu14.04设置开机自启动脚本

    方法一.编辑rc.loacl脚本  Ubuntu开机之后会执行/etc/rc.local文件中的脚本,所以我们可以直接在/etc/rc.local中添加启动脚本.在 exit 0 前面添加好脚本代码, ...

  5. ubuntu14.04设置sublime text3为默认文本编辑器

    更新时间2017年07月20日17:35:04 原来的方法貌似并不试用,现在才发现,其实ubuntu下也和Windows下一样... 右键,属性,然后如图所示 set as default 即可. 之 ...

  6. ubuntu14.04设置静态ip

    1. 找到文件并作如下修改: sudo vim /etc/network/interfaces 修改如下部分: auto eth0 iface eth0 inet static address 192 ...

  7. 在ubuntu14.04设置静态ip

    打开网络的配置文件 sudo vim /etc/network/interfaces 选择网卡,我这里是有线网卡eth0,设置静态ip为192.168.1.108 auto eth0 iface et ...

  8. ubuntu14.04设置开机亮度

    1 查看自己的系统亮度的最大值: cd /sys/class/backlight 笔记本的显卡型号不同->亮度调节文件夹名会不同. 2 我的是intel_backlight cd intel_b ...

  9. Ubuntu14.04设置开机root用户登录

    1.sudo vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf 2.添加:greeter-show-manual-login=true 3.su ...

随机推荐

  1. ubuntu文本模式/终端中文乱码解决

    ubuntu文本模式/终端中文乱码解决 1.Alt+Ctrl+F1 进入第一个终端tty1,发现中文乱码. 2.安装zhcon. sudo apt-get install zhcon3 输入下面命令, ...

  2. linux系统PXE+Kickstart自动安装系统

    一.PXEPXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持工作站通过网络从远端服 ...

  3. bootstrap style for jQuery UI Dialog

    页面引用: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> ...

  4. Handlebars模板库浅析

    Handlebars模板库简单介绍 Handlebars是JavaScript一个语义模板库,通过对view(模板)和data(ajax请求的数据,一般是json)的分离来快速构建Web模板.它采用& ...

  5. python之路-Day6

    time & datetime模块 #_*_coding:utf-8_*_ __author__ = 'Alex Li' import time # print(time.clock()) # ...

  6. 【面向对象版】HashMap(增删改查)

    前言: 关于什么是HashMap,HashMap可以用来做些什么,这些定义类的描述,请参照[简易版]HashMap(增删改查)的内容. 这章节主要是面向实例,直接进行HashMap(增删改查)的演示. ...

  7. afnetworking报错pointer being freed was not allocated

    报错内容 YangTao(57008,0x7000002a0000) malloc: *** error for object 0x6180000d6490: pointer being freed ...

  8. NSURLCache详解和使用

    使用缓存的目的是为了使应用程序能更快速的响应用户输入,是程序高效的运行.有时候我们需要将远程web服务器获取的数据缓存起来,以空间换取时间,减少对同一个url多次请求,减轻服务器的压力,优化客户端网络 ...

  9. Java abstract class 和 interface 的区别

    Java abstract class 和 interface 的区别 1. abstract class和interface是Java语言中对于抽象类定义进行支持的两种机制 2. 以Door的抽象概 ...

  10. HTTP 错误 500.21 - Internal Server Error 处理程序“PageHandlerFactory-Integrated”

    网站发布到IIS上,访问时出现错误 原因:在安装Framework v4.0之后,再启用IIS,导致Framework没有完全安装 解决:开始->所有程序->附件->右键点击“命令提 ...