ubuntu14.04设置terminal配色方案以配合使用vim的Solarized插件
在安装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插件的更多相关文章
- Vim以及Terminal 配色方案---"Solarized"配色
linux用户给vim 以及terminal的配色方案---Solarized配色 官网地址:http://ethanschoonover.com/solarized 看这配色:八卦乾坤,赏心悦目,高 ...
- Ubuntu14.04 设置wifi热点
Ubuntu14.04 设置wifi热点 $ sudo add-apt-repository ppa:nilarimogard/webupd8 $ sudo apt-get update $ sudo ...
- Ubuntu14.04设置开机自启动程序
启动应用程序可以帮助我们选择开机启动项.但是在Ubuntu14.04通过Dash输入startup 找不到启动应用程序了,可以通过在控制台输入以下内容: gnome-session-propertie ...
- Ubuntu14.04设置开机自启动脚本
方法一.编辑rc.loacl脚本 Ubuntu开机之后会执行/etc/rc.local文件中的脚本,所以我们可以直接在/etc/rc.local中添加启动脚本.在 exit 0 前面添加好脚本代码, ...
- ubuntu14.04设置sublime text3为默认文本编辑器
更新时间2017年07月20日17:35:04 原来的方法貌似并不试用,现在才发现,其实ubuntu下也和Windows下一样... 右键,属性,然后如图所示 set as default 即可. 之 ...
- ubuntu14.04设置静态ip
1. 找到文件并作如下修改: sudo vim /etc/network/interfaces 修改如下部分: auto eth0 iface eth0 inet static address 192 ...
- 在ubuntu14.04设置静态ip
打开网络的配置文件 sudo vim /etc/network/interfaces 选择网卡,我这里是有线网卡eth0,设置静态ip为192.168.1.108 auto eth0 iface et ...
- ubuntu14.04设置开机亮度
1 查看自己的系统亮度的最大值: cd /sys/class/backlight 笔记本的显卡型号不同->亮度调节文件夹名会不同. 2 我的是intel_backlight cd intel_b ...
- Ubuntu14.04设置开机root用户登录
1.sudo vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf 2.添加:greeter-show-manual-login=true 3.su ...
随机推荐
- 为控件Button设置快捷键(组合键)
控件MenuStrip和ContextMenuStrip可通过ShortCcutKeys属性设置快捷键,而控件Button没有ShortcutKey属性,如何为控件Button设置快捷键呢(组合件键) ...
- 利用BeautifulSoup抓取新浪网页新闻的内容
第一次写的小爬虫,python确实功能很强大,二十来行的代码抓取内容并存储为一个txt文本 直接上代码 #coding = 'utf-8' import requests from bs4 impor ...
- Loadrunner不能调用IE解决方法大全
在使用loadrunner进行性能调试时,录制脚本的时候,发现loadrunner不能调用IE.不能自动启动IE,还有一种情况是可以启动,但是录制不到内容,action的内容为空. 一般遇到这种情况, ...
- linux下redis的安装与部署及基础命令
<1>下载安装文件:redis-3.2.5.tar.gz 放在opt目录下 <2> tar -zxvf redis-3.2.5.tar.gz,备份redis.conf到自己的目 ...
- cell嵌套UIWebView遇到的几个问题
一.防止死循环问题 方法一:使用动画块 [self.myTableView beginUpdates];[self.myTableView endUpdates]; 在下面的代 ...
- Halcon学习之tuple
* define a tuple for int, double, string... not for object d:=[] * assignment d[0] := 'a string' * g ...
- Spark 读取HBase和SolrCloud数据
Spark1.6.2读取SolrCloud 5.5.1 //httpmime-4.4.1.jar // solr-solrj-5.5.1.jar //spark-solr-2.2.2-20161007 ...
- java 线性规划 和lingo 比较
model:max=13*A+ 23*B; 5*A + 15*B <480 ; 4*A + 4 *B <160 ; 35* A + 20 *B <1190 ; end Variabl ...
- jquery的hide()和show()
jquery用hide()和show()函数来控制html元素的显示和隐藏. hide()和show()都可以带参数的,hide(1000)表示隐藏所需的时间为1秒.此外还可以用slow,fast参数 ...
- ubuntu 搭建PPTP VPN服务器
上一篇文章介绍了如何在Ubuntu服务器上搭建IPSEC L2TP VPN服务器.继续介绍如何在Ubuntu服务器上搭建PPTP VPN服务器. 首先安装以下所需包 #apt-get install ...