LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-29-2014, 09:38 PM   #1
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Rep: Reputation: Disabled
Changing the vim background


Hi there,

This is my environment: Win7==>Oracle VB==>Ubuntu==>GFortran. I use vim editor for entering and editing the code. I found it very inconvenient that the background is black in the editor. Besides the editor colors some parts of the code like comments for instance being dark blue. It is almost impossible to read them.

How can I change the background. I want it to be white.

Thanks, - A.
 
Old 10-29-2014, 09:44 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,340
Blog Entries: 12

Rep: Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730
What precise version of vim are you using?

The versions I've used (all from the command line on Linux) have no background of their own; they take their background from the terminal. For them, to change the background of vim, you would change the background of the terminal.
 
Old 10-29-2014, 10:08 PM   #3
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Original Poster
Rep: Reputation: Disabled
It is a good insight. I will try that. Have no idea what the vim version is. How can I find it out? Thanks, - A.
 
Old 10-29-2014, 10:25 PM   #4
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Original Poster
Rep: Reputation: Disabled
Well, ultimately it does not work. set_color command (had to be installed) appears to be able to change the background but there is no command to change the foreground (fonts). It all looks very ugly.

Last edited by AlexBB; 10-29-2014 at 10:27 PM.
 
Old 10-29-2014, 10:26 PM   #5
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
In a terminal, enter this command:
Code:
vim --version | grep VIM
 
Old 10-29-2014, 10:38 PM   #6
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Original Poster
Rep: Reputation: Disabled
OK, I cracked it, although haphazardly, I mean I stumbled on it after reading some website. The solution is to install the cream which is a beautiful and well arranged editor with graphical interface. It has white background, its own, and it colors FORTRAN statements appropriately.

Thanks, - A.
 
Old 10-29-2014, 10:43 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,340
Blog Entries: 12

Rep: Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730
Glad you got it figured out. Thanks for updating us.
 
Old 10-30-2014, 12:06 AM   #8
fu9ar
Member
 
Registered: Oct 2014
Location: Cyberinternetspace
Distribution: Slackware, mostly
Posts: 49

Rep: Reputation: 2
I've never heard of cream. I use the gtk version of gvim. If it's not already installed, it is usually easy to install. iirc, it's the vim-gtk package in ubuntu repositories...

You can set options by editing a config file in ~ (your homedir) that is called .vimrc

if has('gui_running')
colorscheme elflord
endif

I also have a setting in my .Xdefaults for my rxvt terminal windows because all that bright light hurts my eyes! There are other options, but these are the important ones for this.

rxvt*background:Black
rxvt*foreground:White

and then, you can just use the :colorscheme option in a terminal window or not use the if statement in your vimrc, but you will need to set your terminal background separately, and that depends on how your terminal program does it's thing.
 
Old 10-30-2014, 07:22 PM   #9
AlexBB
Member
 
Registered: Mar 2014
Posts: 435

Original Poster
Rep: Reputation: Disabled
Thank you fu9ar. It is very interesting.

BTW, I just tried gvim. It is installed, however I DO NOT see any difference between cream and gvim. The same graphic interface, the same buttons. Quite a shock. I will be curious how others will comment.

Last edited by AlexBB; 10-31-2014 at 08:31 PM.
 
Old 12-21-2014, 03:56 PM   #10
flyingfisch
LQ Newbie
 
Registered: Dec 2014
Posts: 1

Rep: Reputation: Disabled
gVim is the graphical version of Vim. Cream is an editor that is kind of like gVim. Out of the box, Cream does not have Vim's modes enabled (it is always in insert mode), and there are some other tweaks that supposedly make it easier to use for beginners.

If you want to change your vim background, you can usually do it by changing the color scheme with :color.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vim background color persists in screen session. Help! ananya Linux - Software 1 08-26-2010 12:03 AM
VIM background color setting no effect twwwater Linux - Software 2 05-12-2009 06:20 AM
Is there option to open files in background in vim? nadavvin General 1 02-07-2007 07:16 AM
Changing the background image bripage Linux - General 3 01-25-2002 07:24 PM
Blackbox Background Changing? Breezwell Linux - General 5 01-24-2002 05:11 PM


All times are GMT -5. The time now is 10:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration