【问题标题】:Vim vundle colorschemes - vimrcVim vundle 配色方案 - vimrc
【发布时间】:2016-03-30 23:28:57
【问题描述】:

您好,我一直在尝试在 ubuntu 上配置 vim。

所有软件包似乎都安装得很好。但是,如果通过 vundle 安装颜色方案,然后使用颜色方案名称,它似乎找不到该方案。

我尝试安装 railscasts、solarized 和 Desert-warm,但都未能加载。

这是我的 .vimrc 我做错了吗?

set nocompatible               " be iMproved
filetype off                   " required!

colorscheme desert-warm 

" next tab
map <F7> :tabn    
" previous tab
map <F8> :tabp
" Close Tab abd save
map <F9> ZZ
" open and edit file
map <F6> :tabedit

set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'

" My Bundles here:
"
" original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
Bundle 'tpope/vim-rails.git'
Bundle 'desert-warm-256'
" vim-scripts repos

Bundle 'L9'
Bundle 'FuzzyFinder'
" non github repos
Bundle 'git://git.wincent.com/command-t.git'
Bundle 'https://github.com/vim-scripts/perl-support.vim.git'
Bundle 'https://github.com/Raimondi/delimitMate.git'
Bundle 'https://github.com/altercation/vim-colors-solarized.git'
Bundle 'https://github.com/jpo/vim-railscasts-theme.git'
" ...

filetype plugin indent on     " required!
"
" Brief help
" :BundleList          - list configured bundles
" :BundleInstall(!)    - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!)      - confirm(or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..

【问题讨论】:

    标签: vim


    【解决方案1】:

    尝试将 colorscheme 调用移到文件末尾。

    另外,您示例中的配色方案名称对我不起作用 - 它应该是 colorscheme desert-warm-256。要查看当前安装的配色方案列表,请尝试以交互方式输入 :colorscheme &lt;TAB&gt;

    【讨论】:

    • 谢谢, 小贴士真的很有用。
    【解决方案2】:

    我认为这个问题的答案是在原始发布者的.vimrc 中没有call vundle#end()syntax on

    call vundle#end() 之后的任何位置添加这两行,例如colorscheme solarized 行就可以解决问题。

    【讨论】:

    • 谢谢,在 vundle#() 解决我的问题之后添加配色方案行
    • 我相信早期版本的 vundle 不需要调用 vundle#end()。在新机器上做 vundle 的 git clone 时,我必须添加这个。见例子 .vimrc link
    【解决方案3】:

    colorscheme desert-warm 必须在 Bundle 'desert-warm-256' 之后,因为它是 Bundle 命令将内容添加到路径:

    Bundle 'desert-warm-256'
    colorscheme desert-warm
    

    来源:same question on GitHub issue

    注意:Vundle 最近 (2014-03-18) 已更换为使用 Plugin 而不是 Bundle,因此在您使用 git pull 之后它将是:

    Plugin 'desert-warm-256'
    colorscheme desert-warm
    

    【讨论】:

      【解决方案4】:

      您应该在 Plugin 行之后写下您的“colorsheme Desert bla bla”行。因为Vundle首先需要安装这个颜色插件,然后才能使用它。对不起,我的英语太累了。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-12-30
        • 2010-12-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多