3

Here's my .vimrc file:

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

Opening the file using vim is okay, but when typing > vim example.txt doesn't display gruvbox colorscheme, I'm using windows, how to fix it?

Suacrbah
  • 43
  • 1
  • 4
  • Text files have almost no color by default: there are no syntactic elements to highlight. Try editing some code (you may also want `syntax on`, depending on your preferences). I’m assuming by “doesn’t display gruvbox colorscheme” you mean “the text isn’t highlighted,” and not “none of the editor’s elements are highlighted appropriately” – D. Ben Knoble Dec 27 '18 at 14:57
  • No, it’s the background color and everything in gruvbox, I actually have syntax on, but that’s not the problem so I didn’t post it. Thanks for answering – Suacrbah Dec 27 '18 at 15:00
  • I recommend [edit]ing your question to explain exactly what your problem is. – D. Ben Knoble Dec 27 '18 at 15:25
  • @D.BenKnoble okay thanks, Imma do it soon – Suacrbah Dec 27 '18 at 15:39

1 Answers1

7

As I understand from your question, you can open a file in gvim with the colorscheme on but not from terminal? Gruvbox has two modes as light and dark. It could be that gvim uses dark mode by default while terminal runs on light mode. Would you try adding below line to your .vimrc?

set background=dark

murateca
  • 132
  • 1
  • 5