【问题标题】:Why doesn't my installed plugin 'gruvbox' display?为什么我安装的插件 'gruvbox' 不显示?
【发布时间】:2018-12-27 13:21:10
【问题描述】:

这是我的 .vimrc 文件:

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=$HOME/.vim/bundle/Vundle.vim/
call vundle#begin('$HOME/.vim/bundle/')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" Plugin gruvbox
Plugin 'morhetz/gruvbox'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

colorscheme gruvbox

用vim打开文件没问题,但是输入> vim example.txt时不显示gruvbox颜色方案,我用的是windows,怎么解决?

【问题讨论】:

  • 默认情况下文本文件几乎没有颜色:没有要突出显示的句法元素。尝试编辑一些代码(您可能还需要syntax on,这取决于您的偏好)。我假设“不显示 gruvbox 颜色方案”是指“文本未突出显示”,而不是“编辑器的所有元素都未适当突出显示”
  • 不,它是背景颜色和 gruvbox 中的所有内容,我实际上已经启用了语法,但这不是问题所以我没有发布它。感谢您的回答
  • 我建议editing 你的问题来准确解释你的问题是什么。
  • @D.BenKnoble 好的,谢谢,我马上就做

标签: vim plugins color-scheme vundle


【解决方案1】:

我从您的问题中了解到,您可以在 gvim 中打开一个带有颜色方案的文件,但不能从终端打开? Gruvbox 有明暗两种模式。可能是 gvim 默认使用暗模式,而终端在亮模式下运行。您会尝试在您的 .vimrc 中添加以下行吗?

set background=dark

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-02-21
    • 1970-01-01
    • 1970-01-01
    • 2018-04-11
    • 1970-01-01
    相关资源
    最近更新 更多