0

I use gnome-termial most of the time, and the Nord colorscheme works well withat hat.

I sometimes also use Tilda (another terminal emulator), and the Nord colorscheme doesn't work well with that!

I've put then colorscheme nord in my vimrc file. How can I disable nord in Vim only one time?

EDIT:-

~$ cat .vimrc
call plug#begin('~/.vim/plugged')

Plug 'vim-scripts/c.vim'

Plug 'vim-airline/vim-airline-themes'

Plug 'vim-airline/vim-airline'

Plug 'arcticicestudio/nord-vim'

Plug 'scrooloose/nerdtree'
set number
call plug#end()
if &term =="gnome-256color"
    colorscheme nord
endif
1

The :colorscheme command is just like any Vim command. You can run it from Vim's commandline mode after it started: :colorscheme <name>.

This applies to almost everything that you can put in your vimrc by the way.

The default colour scheme is named default; you can load it with :colorscheme default.


You can try doing it automatically from your vimrc based on the $TERM setting or something else unique in the environment:

if &term == "gnome-256color"
    colorscheme nord
endif

I guessed the TERM name here, as gnome-terminal doesn't want to start on my system for some reason. You'll have to check if this is the correct value.


Note that colorscheme will clear custom highlights, you need to define those in an autocommand if you have any of them (see Why do custom highlights in my vimrc get cleared or reset to default?).

  • Thanks for the :colorscheme default ,Thats what I needed at the first place.But I have tried if &term == "gnome-256color" colorscheme nord endif And when I execute the vim in terminal,Vim doesn't start in nord by default. I am posting the content of my .vimrc file. – noone Aug 27 '17 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.