注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

随机过程

http://superware.blog.163.com

 
 
 

日志

 
 

Solarized Colorscheme for Vim  

2013-12-02 14:26:41|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

Visit the Solarized homepage

See the Solarized homepage for screenshots, details and colorscheme versions for Vim, Mutt, popular terminal emulators and other applications.


Solarized Colorscheme for Vim - superware - 随机过程

Downloads

If you have come across this colorscheme via the Vim-only repository on github, or the [vim.org script] page see the link above to the Solarized homepage or visit the main Solarized repository.

The Vim-only repository is kept in sync with the main Solarized repository and is for installation convenience only (with Pathogen or Vundle, for instance). Issues, bug reports, changelogs are centralized at the main Solarized repository.



Installation


Option 1: Manual installation

  1. Move solarized.vim to your .vim/colors directory. After downloading the vim script or package:

    $ cd vim-colors-solarized/colors
    $ mv solarized.vim ~/.vim/colors/
    

  1. Download and install Tim Pope’s Pathogen.

  2. Next, move or clone the vim-colors-solarized directory so that it is a subdirectory of the .vim/bundle directory.

    1. Clone:

      $ cd ~/.vim/bundle
      $ git clone git://github.com/altercation/vim-colors-solarized.git
      
    2. Move:

      In the parent directory of vim-colors-solarized:

      $ mv vim-colors-solarized ~/.vim/bundle/
      
 

Modify .vimrc

After either Option 1 or Option 2 above, put the following two lines in your .vimrc:

syntax enable
set background=dark
colorscheme solarized

or, for the light background mode of Solarized:

syntax enable
set background=light
colorscheme solarized

I like to have a different background in GUI and terminal modes, so I can use the following if-then. However, I find vim’s background autodetection to be pretty good and, at least with MacVim, I can leave this background value assignment out entirely and get the same results.

if has('gui_running')
    set background=light
else
    set background=dark
endif

See the Solarized homepage for screenshots which will help you select either the light or dark background.


IMPORTANT NOTE FOR TERMINAL USERS:

If you are going to use Solarized in Terminal mode (i.e. not in a GUI version like gvim or macvim), please please please consider setting your terminal emulator’s colorscheme to used the Solarized palette. I’ve included palettes for some popular terminal emulator as well as Xdefaults in the official Solarized download available from Solarized homepage. If you use Solarized without these colors, Solarized will need to be told to degrade its colorscheme to a set compatible with the limited 256 terminal palette (whereas by using the terminal’s 16 ansi color values, you can set the correct, specific values for the Solarized palette).

If you do use the custom terminal colors, solarized.vim should work out of the box for you. If you are using a terminal emulator that supports 256 colors and don’t want to use the custom Solarized terminal colors, you will need to use the degraded 256 colorscheme. To do so, simply add the following line before the colorschem solarized line:

let g:solarized_termcolors=256

Again, I recommend just changing your terminal colors to Solarized values either manually or via one of the many terminal schemes available for import.


本方案在 Mac OS X 终端很漂亮,但在 Linux 的 xterm 上显示一般,如图:

Solarized Colorscheme for Vim - superware - 随机过程
 
本方案的 ~/.Xresources 设置如下:

Term*utf8Title: true
XTerm*faceName: Liberation Mono:antialias=false:pixelsize=14
XTerm*faceNameDoublesize: AR PL UMing CN:antialias=false:pixelsize=14

  评论这张
 
阅读(114)| 评论(0)
推荐

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017