Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 Apr 9 '13 at 12:56

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

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"

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

share|improve this answer

You must log in to answer this question.