Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Open a ssh or telnet connection in secureCRT 6.0 or 7.0, when "vim xxx.txt", after quit vim by ":q", the content of xxx.txt will still be visible in screen. But in putty, the same operation, content of xxx.txt will be disappear. How to configure secureCRT to be like putty?

share|improve this question

migrated from stackoverflow.com Apr 9 '13 at 12:56

This question came from our site for professional and enthusiast programmers.

1 Answer 1

According to this post, adding the following code into .vimrc works for me:

if &term =~ "xterm"
    " SecureCRT versions prior to 6.1.x do not support 4-digit DECSET
    "     let &t_ti = "\<Esc>[?1049h"
    "     let &t_te = "\<Esc>[?1049l"
    " Use 2-digit DECSET instead
    let &t_ti = "\<Esc>[?47h"
    let &t_te = "\<Esc>[?47l"
endif

For more information regarding the two variables ti and te, you can refer to :help xterm-screens in Vim

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.