LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 11-04-2008, 12:08 AM   #1
xthx1138@fastmail.fm
LQ Newbie
 
Registered: Jan 2008
Posts: 5

Rep: Reputation: 0
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.
 
Old 11-04-2008, 12:56 PM   #2
Ranguvar
Member
 
Registered: Oct 2008
Location: Upstate NY
Distribution: Arch Linux
Posts: 99

Rep: Reputation: 17
If you're in a graphical environment, why not use gVim?
 
Old 11-04-2008, 01:08 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by Ranguvar View Post
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 View Post
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.
 
Old 11-06-2008, 01:12 AM   #4
xthx1138@fastmail.fm
LQ Newbie
 
Registered: Jan 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Found the solution, from the debian-user group. Add this to ~/.vimrc:

set t_ti= t_te= "Don't use alternate screen
hi LineNr ctermfg=lightgray "Or whatever colour you want the line numbers to be
 
Old 11-06-2008, 01:17 AM   #5
xthx1138@fastmail.fm
LQ Newbie
 
Registered: Jan 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Sorry, this:

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.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Gnome Terminal Backspace Screen flashing problem! e_liming Linux - Software 4 11-23-2009 08:21 AM
[SOLVED] Dual Monitors, Swapping screen 1 for screen 0 almcneill Linux - Hardware 2 11-30-2006 12:54 PM
Gnome crashes to black screen after boot up (though ctrl-alt-F2 gives a terminal) Gossamer Linux - Newbie 0 10-06-2005 01:32 AM
how to set gnome-terminal to open in full screen by default ankur_linuxfan Linux - Software 0 01-18-2005 05:45 AM
suppressing boot output to terminal aethereal Linux - Newbie 2 12-23-2001 08:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:29 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
Open Source Consulting | Domain Registration