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 ...
随机推荐
- 选项卡切换:自动定时&主动触发事件
最初学习的是手动触发事件,添加的是onmouseover,其中index是关键,tab标签与现实内容的div索引一一对应,遍历tab标签,当鼠标移动到某标签时,触发对应的内容div显示.for(var ...
- js获取及判断按键的方法
js 里面的键盘事件经常用到,所以收集了键盘事件对应的键码来分享下: keyCode 8 = BackSpace BackSpace keyCode 9 = Tab Tab keyCode 12 = ...
- 对于那本--你必须知道的499个C语言问题--总结
(1)1.3 (2)1.10没看懂 (3)1.11和1.12都讲到了 静态变量和局部变量,那么这两个是啥啊,我不懂: (4)1.13针对那两个字符串定义为啥有问题,不懂 (5)2.8是做什么的 ( ...
- win7 双屏双任务栏
扩展屏幕下都显示任务栏!!! 第一步:Dual Monitor Taskbar 下载 下载链接:链接: http://pan.baidu.com/s/1pKxYUFL 密码: gu5c 第二步:安装完 ...
- centos7配置wordpress
1.安装Apache和mariadb yum -y install httpdyum -y install mariadb-server mariadb 2.设置开机启动 systemctl enab ...
- spring 异常记录
1.异常: java.lang.IllegalArgumentException: No converter found for return value of type: class java.ut ...
- Windows 磁盘检查命令
今天在给朋友重装系统时,发现每次重启时总是出现下面的问题 上网搜索了下这个问题,可能的原因是:把磁盘格式转换成NTFS时没等转换完就重启或关机造成的. 解决方案:使用 "chkdsk/f D ...
- Python“Non-ASCII character 'xe5' in file”报错问题(转)
今天在编译一个Python程序的时候,一直出现"Non-ASCII character 'xe5' in file"报错问题 SyntaxError: Non-ASCII char ...
- SQL Server 通用分页存储过程
create proc commonPagination ), --要显示的列名,用逗号隔开 ), --要查询的表名 ), --排序的列名 ), --排序的方式,升序为asc,降序为 desc ), ...
- MySql密码忘记解决方法
1.先杀掉mysqld-nt.exe 进程,有很多种方法,最简单是在CMD里输入net stop mysql 2.CMD路径切换到MySQL的安装目录下的bin里 输入mysqld-nt.exe - ...