putty with vi result

When I use secureCRT, I can edit a file use vi and after I exit vi, I can see what was in the file. But if I use putty, then after I quit vi, I can't see what's in the file. It hides all the file from editor.
xiaoyunwuAsked:
Who is Participating?
 
pmasottaCommented:
I agree with unSpawn but if you really need that feature with putty just go to putty's Configuration/Terminal/Features/ and check "Disable Switching to alternate terminal screen"
After that change when you exit nano or vi  you'll see a black screen but if you scroll up you'll get what your are looking for.
0
 
dfkeCommented:
Set all colour settings to default in Putty, maybe that helps.
0
 
unSpawnCommented:
Say for instance you're running 'vipw' as root and you edit /etc/shadow. Now after closing the encrypted passwords remain displayed on your screen for anyone to see. Would that be preferable or even wise? A terminal emulates a console. It is not the same and it may not behave the same (it might have scroll-back buffers). A good terminal should adhere to any escape sequences and clean up on closing an editor or pager. This IMHO is not behaviour you should rely on, or even worse, should *want* to change.
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
xiaoyunwuAuthor Commented:
I understand what you say, unSpawn.

I usually only edit common file, and it's convenient. Is there a way?
0
 
balasundaram_sCommented:
It depends on the TERM emulation set for your session.   If you change the TERM emulation to 'ansi'(for example) for your putty session, then your problem will be solved.

$ export TERM=ansi

Note: Other programs might not like the 'ansi' terminal emulation, and may display erratically.
0
 
xiaoyunwuAuthor Commented:
Pmasotta, It's worked after I changed the setting as you told.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.