无法安装 vim solarized [英] Fail to install vim solarized

查看:25
本文介绍了无法安装 vim solarized的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在vim上安装solarized插件很纠结,下面是我遵循的步骤

  1. 使用 gmarik/Vundle.vim 安装 Solarized 插件(使用下面的 .vimrc 脚本)
  2. 运行 vim +PluginInstall +qall 安装插件
  3. 在 .vimrc 中加入以下几行:

<块引用>

语法启用
设置背景=暗
颜色方案曝光

.vimrc 脚本使用

但是结果solarized插件带来了以下外观和感觉不符合预期的结果

期待的样子

我做错了什么吗?请指教.感谢并感谢大家的帮助

尝试添加

设置 t_Co=256让 g:solarized_termcolors=256

看起来更好,但仍然与作者展示的截图不同

解决方案

我曾经遇到过同样的问题.我想最简单的方法是使用 pathogen.从控制台安装病原体:

 mkdir -p ~/.vim/autoload ~/.vim/bundle;\curl -LSso ~/.vim/autoload/pathogen.vim \https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim

然后将其添加到您的 .vimrc 中:

执行病原体#infect()

现在你可以将插件安装到 ~/.vim/bundle 中,它会自动加载到 vim.要安装solarized 主题,只需添加vim-colors-solarized 插件:

cd ~/.vim/bundlegit 克隆 git://github.com/altercation/vim-colors-solarized.git

剩下的就是将 t_Co 设置为 256 并将colorscheme 设置为solarized.你也可以试试:

设置 t_Co = 256

最后将终端模拟器的配色方案更改为solarized 可能会有所帮助.或者,如果您不想这样做,请在将颜色方案设置为曝光之前在 .vimrc 中添加这一行:

让 g:solarized_termcolors=256

我希望它有帮助:)

I am struggling on the installation of solarized plugin on vim, the following are the steps I followed

  1. Use gmarik/Vundle.vim to install the solarized plugin (with the below .vimrc script)
  2. Run vim +PluginInstall +qall to install the plugin
  3. Put the following lines in the .vimrc:

syntax enable
set background=dark
colorscheme solarized

.vimrc script used

But outcome the solarized plugin comes with following results which look and feel are not as expected

Expecting look

Is there anything I have done wrong? Please advice. Thanks and appreciate everyone for the kind help

Try to add

set t_Co=256 let g:solarized_termcolors=256

Looks better, but still different from the capture shown by the author

解决方案

I had the same problem once. I guess the easiest way to do this is using pathogen. To install pathogen, from console:

    mkdir -p ~/.vim/autoload ~/.vim/bundle; \
curl -LSso ~/.vim/autoload/pathogen.vim \
    https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim

Then add this to your .vimrc:

execute pathogen#infect()

Now you can install plugins into ~/.vim/bundle which will be automatically loaded to vim. To install solarized theme, simply add vim-colors-solarized plugin:

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

The rest you have, which is setting t_Co to 256 and setting colorscheme to solarized. You may also try:

set t_Co = 256

Finally changing terminal emulator's color scheme to solarized might help. Or if you don't want to do this, add this line in .vimrc before setting your colorscheme to solarized:

let g:solarized_termcolors=256 

I hope it helps :)

这篇关于无法安装 vim solarized的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆