delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/10/18/18:29:27

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
content-class: urn:content-classes:message
MIME-Version: 1.0
Subject: RE: exiting vim changes background colour of console
Date: Wed, 19 Oct 2005 08:29:08 +1000
Message-ID: <88ACCA0E0A7A914DAFBA3918021605D24E3FD0@WPEXCH08.colesmyer.ad.cmltd.net.au>
From: "Robert Bram" <Robert DOT Bram AT colesmyer DOT com DOT au>
To: <cygwin AT cygwin DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j9IMTPQv021190

Hi Igor,

Thanks to you and Corinna for the feedback so far!

> > > > ==
> > > > I am finding that when I exit from vim, it turns my background
> > > > back into black (which is how I had it before I tried changing
> > > > it today). Is there a setting or something I have forgotten to
> > > > change?
> > > > ==
> > > > Actually this is happenning not just after vim.. but even after I exit
> > > > "less"!
> > >
> > > Works for me.  Did you close the console window and re-open one after
> > > changing the colors?  Before doing this, the console colors are known
> > > to be scrambled as you describe above.
> >
> > Yes I closed and re-opened the console and the problem recurs. :-/
>
> vim (and less, since you seem to have the same problem there) use
> something called an "alternate screen".  This is a feature of the terminal
> that allows the program to make arbitrary modifications to the terminal
> screen that will be undone when the program switches back to the main
> screen.  In particular, any color changes will be undone.  Consequently,
> if you wish to change the color of the main screen, don't do this while
> running vim or less.
> HTH,

I admit to being somewhat confused by your remark - I didn't change the screen while running vim or less. I edited the properties of the console so that it would affect all consoles with the same name, changed the PS1 environment variable in my .bash_profile, closed the console, re-opened it, ran vim and/or less, exited vim and/or less and then found the console colors changed. Have I misunderstood your point?

Interestingly, I find that I can keep pressing ENTER and 'clear' the screen back to how it was, but this is an ugly solution.

Kind regards,

Rob
:)

-------
Robert Mark Bram
Portal Analyst Programmer
eTechnology, Coles Myer Limited
robert DOT bram AT colesmyer DOT com DOT au
+61 3 9635 1036


-----Original Message-----
From: Igor Pechtchanski [mailto:pechtcha AT cs DOT nyu DOT edu]
Sent: Wednesday, 19 October 2005 4:28 AM
To: Robert Bram
Cc: cygwin AT cygwin DOT com
Subject: RE: exiting vim changes background colour of console


On Tue, 18 Oct 2005, Robert Bram wrote:

> Hi Corinna,
>
> > > ==
> > > I am finding that when I exit from vim, it turns my background
> > > back into black (which is how I had it before I tried changing
> > > it today). Is there a setting or something I have forgotten to
> > > change?
> > > ==
> > > Actually this is happenning not just after vim.. but even after I exit
> > > "less"!
> >
> > Works for me.  Did you close the console window and re-open one after
> > changing the colors?  Before doing this, the console colors are known
> > to be scrambled as you describe above.
>
> Yes I closed and re-opened the console and the problem recurs. :-/

vim (and less, since you seem to have the same problem there) use
something called an "alternate screen".  This is a feature of the terminal
that allows the program to make arbitrary modifications to the terminal
screen that will be undone when the program switches back to the main
screen.  In particular, any color changes will be undone.  Consequently,
if you wish to change the color of the main screen, don't do this while
running vim or less.
HTH,
	Igor
--
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

This email and any attachments may contain privileged and confidential information and are intended for the named addressee only. If you have received this e-mail in error, please notify the sender and delete this e-mail immediately. Any confidentiality, privilege or copyright is not waived or lost because this e-mail has been sent to you in error. It is your responsibility to check this e-mail and any attachments for viruses.  No warranty is made that this material is free from computer virus or any other defect or error.  Any loss/damage incurred by using this material is not the sender's responsibility.  The sender's entire liability will be limited to resupplying the material.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019