vi under GNOME Terminal -- Suppressing Screen Buffering/Swapping
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
vi under GNOME Terminal -- Suppressing Screen Buffering/Swapping
When I run vi (or vim, or nvi) from GNOME Terminal some kind of annoying screen buffering/swapping is invoked. Normally I can use GNOME Terminal scrollbars to scroll back though all my previous screen output, but while I'm in vi that's suppressed. The scrollbars basically go away. Then, when I exit vi, the screen is redisplayed as it was just before vi started. That is, all of the screen output I generated during the vi session is lost.
This may be useful in some situations, but I'd like to turn it off.
If you're in a graphical environment, why not use gVim?
Probably because there's no point in adding overhead to a given program if you are going to use it with the keyboard anyway. That's what vim is about anyway, isn't it?
Quote:
Originally Posted by xthx1138@fastmail.fm
When I run vi (or vim, or nvi) from GNOME Terminal some kind of annoying screen buffering/swapping is invoked. Normally I can use GNOME Terminal scrollbars to scroll back though all my previous screen output, but while I'm in vi that's suppressed. The scrollbars basically go away. Then, when I exit vi, the screen is redisplayed as it was just before vi started. That is, all of the screen output I generated during the vi session is lost.
This may be useful in some situations, but I'd like to turn it off.
I can't give you a solution because I am not too knowledgeable about vim. But mine by default doesn't do this so it should be configurable. When I exit vim I can still see the file I was editing on my terminal.
hi LineNr ctermfg=lightgray "Or whatever colour you want the line numbers to be
had nothing to do with my post, but it's something else I was working on: line number colors. Anyway, I've done away with the alternate screen and life is good.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.