Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.