Loading ...
Sorry, an error occurred while loading the content.

vim window clears the terminal history

Expand Messages
  • joe M
    Hello, When I close a vim/vi window from the terminal, I get a screenful of blank screen and any previous terminal history is blanked out. It seems to be a
    Message 1 of 16 , Aug 28 9:29 AM
    • 0 Attachment
      Hello,

      When I close a vim/vi window from the terminal, I get a screenful of
      blank screen and any previous terminal history is blanked out.

      It seems to be a well-known issue as documented at
      http://www.shallowsky.com/linux/noaltscreen.html

      It is similar to what is described here, but, instead of viewing the
      files' contents, I get a blank screen.
      http://serverfault.com/questions/270103/gnu-screen-clearing-on-vim-less-etc-exit

      my terminal settings:

      infocmp -C rxvt-unicode-256color
      # Reconstructed via infocmp from file:
      /usr/share/terminfo/r/rxvt-unicode-256color
      # (untranslatable capabilities removed to fit entry within 1023 bytes)
      rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System):\
      :am:bw:eo:hs:km:mi:ms:xn:xo:\
      :co#80:it#8:li#24:lm#0:\
      :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
      :K1=\EOw:K2=\EOu:K3=\EOy:K4=\EOq:K5=\EOs:LE=\E[%dD:\
      :RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ae=\E(B:al=\E[L:\
      :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
      :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\
      :dl=\E[M:do=^J:ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:\
      :ho=\E[H:i1=\E[!p:ic=\E[@:im=\E[4h:\
      :is=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l:\
      :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\
      :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:\
      :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kd=\E[B:ke=\E>:\
      :kh=\E[7~:kl=\E[D:kr=\E[C:ks=\E=:ku=\E[A:le=^H:mb=\E[5m:\
      :md=\E[1m:me=\E[0m:mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:\
      :se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
      :te=\E[r\E[?1049l:ti=\E[?1049h:ts=\E]2;:ue=\E[24m:\
      :up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?25h:vi=\E[?25l:\
      :vs=\E[?25h:
      --(/tmp)---------------------------------------------------------------------------------------------------------------------(pts/3@master)--
      echo $TERM
      rxvt-unicode-256color

      vim :set termcap shows the below:

      --- Terminal codes ---
      t_AL=^[[%p1%dL t_CS= t_fs=^G
      t_md=^[[1m t_RV=^[[>c t_us=^[[4m t_xs=
      t_al=^[[L t_CV= t_IE=^G
      t_me=^[[m t_se=^[[27m t_vb= t_ZH=^[[3m
      t_bc= t_ut=y t_IS=^[]1;
      t_mr=^[[7m t_so=^[[7m t_ve=^[[?25h
      t_ZR=^[[23m
      t_cd=^[[J t_da= t_ke=^[[?1l^[> t_ms=y
      t_sr=^[M t_vi=^[[?25l
      t_ce=^[[K t_db= t_ks=^[[?1h^[=
      t_nd=^[[C t_ts=^[]2; t_vs=^[[?25h
      t_cl=^[[H^[[2J t_DL=^[[%p1%dM t_le=^H
      t_op=^[[39;49m t_ti=^[[?1049h t_SI=
      t_Co=256 t_dl=^[[M t_mb=^[[5m
      t_RI=^[[%p1%dC t_ue=^[[m t_EI=
      t_AB=^[[48;5;%p1%dm
      t_AF=^[[38;5;%p1%dm
      t_cm=^[[%i%p1%d;%p2%dH
      t_cs=^[[%i%p1%d;%p2%dr
      t_Sb=%?%p1%{7}%>%t^[[48;5;%p1%dm%e^[[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;
      t_Sf=%?%p1%{7}%>%t^[[38;5;%p1%dm%e^[[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;
      t_te=^[[r^[[?1049l
      t_WP=^[[3;%p1%d;%p2%dt
      t_WS=^[[8;%p1%d;%p2%dt
      --- Terminal keys ---
      t_#2 <S-Home> ^[[7$ t_K4 <kEnd> ^[[4;*~ t_k4 <F4>
      ^[[14;*~ t_kP <PageUp> ^[[5;*~ <xF4> ^[O*S
      t_#4 <S-Left> ^[[d t_K5 <kPageDown> ^[Os t_k5 <F5>
      ^[[15;*~ t_kb <BS> ^? <xEnd> ^[O*F
      t_%1 <Help> ^[[28;*~ t_K6 <kPlus> ^[O*k t_k6 <F6>
      ^[[17;*~ t_kd <Down> ^[O*B <zEnd> ^[[8;*~
      t_%i <S-Right> ^[[c t_K7 <kMinus> ^[O*m t_k7 <F7>
      ^[[18;*~ t_kh <Home> ^[[1;*H <xHome> ^[O*H
      t_&8 <Undo> ^[[26;*~ t_K8 <kDivide> ^[O*o t_k8 <F8>
      ^[[19;*~ t_kl <Left> ^[O*D <zHome> ^[[7;*~
      t_*7 <S-End> ^[[8$ t_K9 <kMultiply> ^[O*j t_k9 <F9>
      ^[[20;*~ t_kr <Right> ^[O*C <xUp> ^[[1;*A
      t_@7 <End> ^[[1;*F t_KA <kEnter> ^[O*M t_k; <F10>
      ^[[21;*~ t_ku <Up> ^[O*A <xDown> ^[[1;*B
      t_F1 <F11> ^[[23;*~ t_KB <kPoint> ^[O*n t_kB <S-Tab>
      ^[[Z <Mouse> ^[[M <xLeft> ^[[1;*D
      t_F2 <F12> ^[[24;*~ t_k1 <F1> ^[[11;*~ t_kD <Del>
      ^[[3~ <xF1> ^[O*P <xRight> ^[[1;*C
      t_K1 <kHome> ^[[1;*~ t_k2 <F2> ^[[12;*~ t_kI <Insert>
      ^[[2;*~ <xF2> ^[O*Q <kDel> ^[[3;*~
      t_K3 <kPageUp> ^[Oy t_k3 <F3> ^[[13;*~ t_kN <PageDown>
      ^[[6;*~ <xF3> ^[O*R


      vim version below

      :version
      VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 28 2012 08:09:40)
      Included patches: 1-638
      Compiled by root@master
      Huge version without GUI. Features included (+) or not (-):
      +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset
      +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist
      +cmdline_info +comments +conceal +cryptv +cscope +cursorbind
      +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags
      +eval
      +ex_extra +extra_search +farsi +file_in_path +find_in_path +float
      +folding -footer +fork() -gettext -hangul_input +iconv +insert_expand
      +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds
      +localmap +lua +menu +mksession +modify_fname +mouse -mouseshape
      +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
      +mouse_xterm +mouse_urxvt +mouse_sgr +multi_byte +multi_lang -mzscheme
      +netbeans_intg +path_extra +perl +persistent_undo +postscript +printer
      +profile +python -python3 +quickfix +reltime +rightleft +ruby
      +scrollbind +signs +smartindent -sniff +startuptime +statusline
      -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl
      +terminfo +termresponse +textobjects +title -toolbar +user_commands
      +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
      +wildignore +wildmenu +windows +writebackup +X11 +xfontset -xim
      +xsmp_interact +xterm_clipboard -xterm_save
      system vimrc file: "$VIM/vimrc"
      user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
      fall-back for $VIM: "/usr/share/vim"
      Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -pipe -ftracer
      -fgcse-after-reload -march=core2 -mcx16 -msahf -mpclmul -mpopcnt -msse
      4.2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param
      l2-cache-size=3072 -mtune=generic -U_FORTIFY_SOURCE
      -D_FORTIFY_SOURCE=1
      -I/usr/include -D_LARGEFILE64_SOURCE=1
      Linking: gcc -L. -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
      -rdynamic -Wl,-export-dynamic -Wl,-E
      -Wl,-rpath,/usr/lib/perl5/5.12/linux
      -thread-multi/CORE -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
      -Wl,--as-needed -o vim -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM
      -lICE
      -lm -lncurses -lelf -lnsl -ldl -L/usr/lib -llua -Wl,-E
      -Wl,-rpath,/usr/lib/perl5/5.12/linux-thread-multi/CORE
      -fstack-protector -L/usr/
      lib/perl5/5.12/linux-thread-multi/CORE -lperl -lnsl -ldl -lm -lcrypt
      -lutil -lpthread -lc -L/usr/lib/python2.7/config -lpython2.7 -lpthread
      -
      ldl -lutil -lm -Xlinker -export-dynamic -L/usr/lib -ltcl8.5 -ldl
      -lieee -lm -Wl,-R -Wl,/usr/lib -L/usr/lib -lruby -lpthread -lrt -ldl
      -lcryp
      t -lm -L/usr/lib

      Any thoughts, please?

      Thanks
      Joe

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • joe M
      Hello, More details/correction, vi works fine. The below is the behaviour with vi: --(/tmp/test) -- is my terminal/shell prompt: man test --(/tmp/test) ls
      Message 2 of 16 , Aug 28 9:33 AM
      • 0 Attachment
        Hello,

        More details/correction,

        vi works fine. The below is the behaviour with vi:

        --(/tmp/test) -- is my terminal/shell prompt:
        man test
        --(/tmp/test)
        ls
        --(/tmp/test)
        vi test
        --(/tmp/test)

        whereas, when I do "vim test", I just get a blank screen and all the
        above is lost/blanked out on the terminal.

        Hope this helps.

        Thanks
        Joe


        On Tue, Aug 28, 2012 at 12:29 PM, joe M <joe9mail@...> wrote:
        > Hello,
        >
        > When I close a vim/vi window from the terminal, I get a screenful of
        > blank screen and any previous terminal history is blanked out.
        >
        > It seems to be a well-known issue as documented at
        > http://www.shallowsky.com/linux/noaltscreen.html
        >
        > It is similar to what is described here, but, instead of viewing the
        > files' contents, I get a blank screen.
        > http://serverfault.com/questions/270103/gnu-screen-clearing-on-vim-less-etc-exit
        >
        > my terminal settings:
        >
        > infocmp -C rxvt-unicode-256color
        > # Reconstructed via infocmp from file:
        > /usr/share/terminfo/r/rxvt-unicode-256color
        > # (untranslatable capabilities removed to fit entry within 1023 bytes)
        > rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System):\
        > :am:bw:eo:hs:km:mi:ms:xn:xo:\
        > :co#80:it#8:li#24:lm#0:\
        > :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
        > :K1=\EOw:K2=\EOu:K3=\EOy:K4=\EOq:K5=\EOs:LE=\E[%dD:\
        > :RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ae=\E(B:al=\E[L:\
        > :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
        > :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\
        > :dl=\E[M:do=^J:ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:\
        > :ho=\E[H:i1=\E[!p:ic=\E[@:im=\E[4h:\
        > :is=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l:\
        > :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\
        > :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:\
        > :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kd=\E[B:ke=\E>:\
        > :kh=\E[7~:kl=\E[D:kr=\E[C:ks=\E=:ku=\E[A:le=^H:mb=\E[5m:\
        > :md=\E[1m:me=\E[0m:mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:\
        > :se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
        > :te=\E[r\E[?1049l:ti=\E[?1049h:ts=\E]2;:ue=\E[24m:\
        > :up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?25h:vi=\E[?25l:\
        > :vs=\E[?25h:
        > --(/tmp)---------------------------------------------------------------------------------------------------------------------(pts/3@master)--
        > echo $TERM
        > rxvt-unicode-256color
        >
        > vim :set termcap shows the below:
        >
        > --- Terminal codes ---
        > t_AL=^[[%p1%dL t_CS= t_fs=^G
        > t_md=^[[1m t_RV=^[[>c t_us=^[[4m t_xs=
        > t_al=^[[L t_CV= t_IE=^G
        > t_me=^[[m t_se=^[[27m t_vb= t_ZH=^[[3m
        > t_bc= t_ut=y t_IS=^[]1;
        > t_mr=^[[7m t_so=^[[7m t_ve=^[[?25h
        > t_ZR=^[[23m
        > t_cd=^[[J t_da= t_ke=^[[?1l^[> t_ms=y
        > t_sr=^[M t_vi=^[[?25l
        > t_ce=^[[K t_db= t_ks=^[[?1h^[=
        > t_nd=^[[C t_ts=^[]2; t_vs=^[[?25h
        > t_cl=^[[H^[[2J t_DL=^[[%p1%dM t_le=^H
        > t_op=^[[39;49m t_ti=^[[?1049h t_SI=
        > t_Co=256 t_dl=^[[M t_mb=^[[5m
        > t_RI=^[[%p1%dC t_ue=^[[m t_EI=
        > t_AB=^[[48;5;%p1%dm
        > t_AF=^[[38;5;%p1%dm
        > t_cm=^[[%i%p1%d;%p2%dH
        > t_cs=^[[%i%p1%d;%p2%dr
        > t_Sb=%?%p1%{7}%>%t^[[48;5;%p1%dm%e^[[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;
        > t_Sf=%?%p1%{7}%>%t^[[38;5;%p1%dm%e^[[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;
        > t_te=^[[r^[[?1049l
        > t_WP=^[[3;%p1%d;%p2%dt
        > t_WS=^[[8;%p1%d;%p2%dt
        > --- Terminal keys ---
        > t_#2 <S-Home> ^[[7$ t_K4 <kEnd> ^[[4;*~ t_k4 <F4>
        > ^[[14;*~ t_kP <PageUp> ^[[5;*~ <xF4> ^[O*S
        > t_#4 <S-Left> ^[[d t_K5 <kPageDown> ^[Os t_k5 <F5>
        > ^[[15;*~ t_kb <BS> ^? <xEnd> ^[O*F
        > t_%1 <Help> ^[[28;*~ t_K6 <kPlus> ^[O*k t_k6 <F6>
        > ^[[17;*~ t_kd <Down> ^[O*B <zEnd> ^[[8;*~
        > t_%i <S-Right> ^[[c t_K7 <kMinus> ^[O*m t_k7 <F7>
        > ^[[18;*~ t_kh <Home> ^[[1;*H <xHome> ^[O*H
        > t_&8 <Undo> ^[[26;*~ t_K8 <kDivide> ^[O*o t_k8 <F8>
        > ^[[19;*~ t_kl <Left> ^[O*D <zHome> ^[[7;*~
        > t_*7 <S-End> ^[[8$ t_K9 <kMultiply> ^[O*j t_k9 <F9>
        > ^[[20;*~ t_kr <Right> ^[O*C <xUp> ^[[1;*A
        > t_@7 <End> ^[[1;*F t_KA <kEnter> ^[O*M t_k; <F10>
        > ^[[21;*~ t_ku <Up> ^[O*A <xDown> ^[[1;*B
        > t_F1 <F11> ^[[23;*~ t_KB <kPoint> ^[O*n t_kB <S-Tab>
        > ^[[Z <Mouse> ^[[M <xLeft> ^[[1;*D
        > t_F2 <F12> ^[[24;*~ t_k1 <F1> ^[[11;*~ t_kD <Del>
        > ^[[3~ <xF1> ^[O*P <xRight> ^[[1;*C
        > t_K1 <kHome> ^[[1;*~ t_k2 <F2> ^[[12;*~ t_kI <Insert>
        > ^[[2;*~ <xF2> ^[O*Q <kDel> ^[[3;*~
        > t_K3 <kPageUp> ^[Oy t_k3 <F3> ^[[13;*~ t_kN <PageDown>
        > ^[[6;*~ <xF3> ^[O*R
        >
        >
        > vim version below
        >
        > :version
        > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 28 2012 08:09:40)
        > Included patches: 1-638
        > Compiled by root@master
        > Huge version without GUI. Features included (+) or not (-):
        > +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset
        > +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist
        > +cmdline_info +comments +conceal +cryptv +cscope +cursorbind
        > +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags
        > +eval
        > +ex_extra +extra_search +farsi +file_in_path +find_in_path +float
        > +folding -footer +fork() -gettext -hangul_input +iconv +insert_expand
        > +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds
        > +localmap +lua +menu +mksession +modify_fname +mouse -mouseshape
        > +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
        > +mouse_xterm +mouse_urxvt +mouse_sgr +multi_byte +multi_lang -mzscheme
        > +netbeans_intg +path_extra +perl +persistent_undo +postscript +printer
        > +profile +python -python3 +quickfix +reltime +rightleft +ruby
        > +scrollbind +signs +smartindent -sniff +startuptime +statusline
        > -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl
        > +terminfo +termresponse +textobjects +title -toolbar +user_commands
        > +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
        > +wildignore +wildmenu +windows +writebackup +X11 +xfontset -xim
        > +xsmp_interact +xterm_clipboard -xterm_save
        > system vimrc file: "$VIM/vimrc"
        > user vimrc file: "$HOME/.vimrc"
        > user exrc file: "$HOME/.exrc"
        > fall-back for $VIM: "/usr/share/vim"
        > Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -pipe -ftracer
        > -fgcse-after-reload -march=core2 -mcx16 -msahf -mpclmul -mpopcnt -msse
        > 4.2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param
        > l2-cache-size=3072 -mtune=generic -U_FORTIFY_SOURCE
        > -D_FORTIFY_SOURCE=1
        > -I/usr/include -D_LARGEFILE64_SOURCE=1
        > Linking: gcc -L. -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
        > -rdynamic -Wl,-export-dynamic -Wl,-E
        > -Wl,-rpath,/usr/lib/perl5/5.12/linux
        > -thread-multi/CORE -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
        > -Wl,--as-needed -o vim -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM
        > -lICE
        > -lm -lncurses -lelf -lnsl -ldl -L/usr/lib -llua -Wl,-E
        > -Wl,-rpath,/usr/lib/perl5/5.12/linux-thread-multi/CORE
        > -fstack-protector -L/usr/
        > lib/perl5/5.12/linux-thread-multi/CORE -lperl -lnsl -ldl -lm -lcrypt
        > -lutil -lpthread -lc -L/usr/lib/python2.7/config -lpython2.7 -lpthread
        > -
        > ldl -lutil -lm -Xlinker -export-dynamic -L/usr/lib -ltcl8.5 -ldl
        > -lieee -lm -Wl,-R -Wl,/usr/lib -L/usr/lib -lruby -lpthread -lrt -ldl
        > -lcryp
        > t -lm -L/usr/lib
        >
        > Any thoughts, please?
        >
        > Thanks
        > Joe

        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Ben Fritz
        ... Does :help xterm-screens address your need? How about http://ubuntuforums.org/showthread.php?t=1684567 or
        Message 3 of 16 , Aug 28 11:45 AM
        • 0 Attachment
          On Tuesday, August 28, 2012 11:46:43 AM UTC-5, joe M wrote:
          > Hello,
          >
          >
          >
          > When I close a vim/vi window from the terminal, I get a screenful of
          >
          > blank screen and any previous terminal history is blanked out.
          >
          >
          >
          > It seems to be a well-known issue as documented at
          >
          > http://www.shallowsky.com/linux/noaltscreen.html
          >
          >
          >
          > It is similar to what is described here, but, instead of viewing the
          >
          > files' contents, I get a blank screen.
          >
          > http://serverfault.com/questions/270103/gnu-screen-clearing-on-vim-less-etc-exit
          >
          >
          >
          > my terminal settings:
          >
          >
          >
          > infocmp -C rxvt-unicode-256color
          >
          > # Reconstructed via infocmp from file:
          >
          > /usr/share/terminfo/r/rxvt-unicode-256color
          >
          > # (untranslatable capabilities removed to fit entry within 1023 bytes)
          >
          > rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System):\
          >
          > :am:bw:eo:hs:km:mi:ms:xn:xo:\
          >
          > :co#80:it#8:li#24:lm#0:\
          >
          > :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
          >
          > :K1=\EOw:K2=\EOu:K3=\EOy:K4=\EOq:K5=\EOs:LE=\E[%dD:\
          >
          > :RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ae=\E(B:al=\E[L:\
          >
          > :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
          >
          > :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\
          >
          > :dl=\E[M:do=^J:ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:\
          >
          > :ho=\E[H:i1=\E[!p:ic=\E[@:im=\E[4h:\
          >
          > :is=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l:\
          >
          > :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\
          >
          > :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:\
          >
          > :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kd=\E[B:ke=\E>:\
          >
          > :kh=\E[7~:kl=\E[D:kr=\E[C:ks=\E=:ku=\E[A:le=^H:mb=\E[5m:\
          >
          > :md=\E[1m:me=\E[0m:mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:\
          >
          > :se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
          >
          > :te=\E[r\E[?1049l:ti=\E[?1049h:ts=\E]2;:ue=\E[24m:\
          >
          > :up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?25h:vi=\E[?25l:\
          >
          > :vs=\E[?25h:
          >
          > --(/tmp)---------------------------------------------------------------------------------------------------------------------(pts/3@master)--
          >
          > echo $TERM
          >
          > rxvt-unicode-256color
          >
          >
          >
          > vim :set termcap shows the below:
          >
          >
          >
          > --- Terminal codes ---
          >
          > t_AL=^[[%p1%dL t_CS= t_fs=^G
          >
          > t_md=^[[1m t_RV=^[[>c t_us=^[[4m t_xs=
          >
          > t_al=^[[L t_CV= t_IE=^G
          >
          > t_me=^[[m t_se=^[[27m t_vb= t_ZH=^[[3m
          >
          > t_bc= t_ut=y t_IS=^[]1;
          >
          > t_mr=^[[7m t_so=^[[7m t_ve=^[[?25h
          >
          > t_ZR=^[[23m
          >
          > t_cd=^[[J t_da= t_ke=^[[?1l^[> t_ms=y
          >
          > t_sr=^[M t_vi=^[[?25l
          >
          > t_ce=^[[K t_db= t_ks=^[[?1h^[=
          >
          > t_nd=^[[C t_ts=^[]2; t_vs=^[[?25h
          >
          > t_cl=^[[H^[[2J t_DL=^[[%p1%dM t_le=^H
          >
          > t_op=^[[39;49m t_ti=^[[?1049h t_SI=
          >
          > t_Co=256 t_dl=^[[M t_mb=^[[5m
          >
          > t_RI=^[[%p1%dC t_ue=^[[m t_EI=
          >
          > t_AB=^[[48;5;%p1%dm
          >
          > t_AF=^[[38;5;%p1%dm
          >
          > t_cm=^[[%i%p1%d;%p2%dH
          >
          > t_cs=^[[%i%p1%d;%p2%dr
          >
          > t_Sb=%?%p1%{7}%>%t^[[48;5;%p1%dm%e^[[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;
          >
          > t_Sf=%?%p1%{7}%>%t^[[38;5;%p1%dm%e^[[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;
          >
          > t_te=^[[r^[[?1049l
          >
          > t_WP=^[[3;%p1%d;%p2%dt
          >
          > t_WS=^[[8;%p1%d;%p2%dt
          >
          > --- Terminal keys ---
          >
          > t_#2 <S-Home> ^[[7$ t_K4 <kEnd> ^[[4;*~ t_k4 <F4>
          >
          > ^[[14;*~ t_kP <PageUp> ^[[5;*~ <xF4> ^[O*S
          >
          > t_#4 <S-Left> ^[[d t_K5 <kPageDown> ^[Os t_k5 <F5>
          >
          > ^[[15;*~ t_kb <BS> ^? <xEnd> ^[O*F
          >
          > t_%1 <Help> ^[[28;*~ t_K6 <kPlus> ^[O*k t_k6 <F6>
          >
          > ^[[17;*~ t_kd <Down> ^[O*B <zEnd> ^[[8;*~
          >
          > t_%i <S-Right> ^[[c t_K7 <kMinus> ^[O*m t_k7 <F7>
          >
          > ^[[18;*~ t_kh <Home> ^[[1;*H <xHome> ^[O*H
          >
          > t_&8 <Undo> ^[[26;*~ t_K8 <kDivide> ^[O*o t_k8 <F8>
          >
          > ^[[19;*~ t_kl <Left> ^[O*D <zHome> ^[[7;*~
          >
          > t_*7 <S-End> ^[[8$ t_K9 <kMultiply> ^[O*j t_k9 <F9>
          >
          > ^[[20;*~ t_kr <Right> ^[O*C <xUp> ^[[1;*A
          >
          > t_@7 <End> ^[[1;*F t_KA <kEnter> ^[O*M t_k; <F10>
          >
          > ^[[21;*~ t_ku <Up> ^[O*A <xDown> ^[[1;*B
          >
          > t_F1 <F11> ^[[23;*~ t_KB <kPoint> ^[O*n t_kB <S-Tab>
          >
          > ^[[Z <Mouse> ^[[M <xLeft> ^[[1;*D
          >
          > t_F2 <F12> ^[[24;*~ t_k1 <F1> ^[[11;*~ t_kD <Del>
          >
          > ^[[3~ <xF1> ^[O*P <xRight> ^[[1;*C
          >
          > t_K1 <kHome> ^[[1;*~ t_k2 <F2> ^[[12;*~ t_kI <Insert>
          >
          > ^[[2;*~ <xF2> ^[O*Q <kDel> ^[[3;*~
          >
          > t_K3 <kPageUp> ^[Oy t_k3 <F3> ^[[13;*~ t_kN <PageDown>
          >
          > ^[[6;*~ <xF3> ^[O*R
          >
          >
          >
          >
          >
          > vim version below
          >
          >
          >
          > :version
          >
          > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 28 2012 08:09:40)
          >
          > Included patches: 1-638
          >
          > Compiled by root@master
          >
          > Huge version without GUI. Features included (+) or not (-):
          >
          > +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset
          >
          > +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist
          >
          > +cmdline_info +comments +conceal +cryptv +cscope +cursorbind
          >
          > +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags
          >
          > +eval
          >
          > +ex_extra +extra_search +farsi +file_in_path +find_in_path +float
          >
          > +folding -footer +fork() -gettext -hangul_input +iconv +insert_expand
          >
          > +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds
          >
          > +localmap +lua +menu +mksession +modify_fname +mouse -mouseshape
          >
          > +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
          >
          > +mouse_xterm +mouse_urxvt +mouse_sgr +multi_byte +multi_lang -mzscheme
          >
          > +netbeans_intg +path_extra +perl +persistent_undo +postscript +printer
          >
          > +profile +python -python3 +quickfix +reltime +rightleft +ruby
          >
          > +scrollbind +signs +smartindent -sniff +startuptime +statusline
          >
          > -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl
          >
          > +terminfo +termresponse +textobjects +title -toolbar +user_commands
          >
          > +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
          >
          > +wildignore +wildmenu +windows +writebackup +X11 +xfontset -xim
          >
          > +xsmp_interact +xterm_clipboard -xterm_save
          >
          > system vimrc file: "$VIM/vimrc"
          >
          > user vimrc file: "$HOME/.vimrc"
          >
          > user exrc file: "$HOME/.exrc"
          >
          > fall-back for $VIM: "/usr/share/vim"
          >
          > Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -pipe -ftracer
          >
          > -fgcse-after-reload -march=core2 -mcx16 -msahf -mpclmul -mpopcnt -msse
          >
          > 4.2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param
          >
          > l2-cache-size=3072 -mtune=generic -U_FORTIFY_SOURCE
          >
          > -D_FORTIFY_SOURCE=1
          >
          > -I/usr/include -D_LARGEFILE64_SOURCE=1
          >
          > Linking: gcc -L. -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
          >
          > -rdynamic -Wl,-export-dynamic -Wl,-E
          >
          > -Wl,-rpath,/usr/lib/perl5/5.12/linux
          >
          > -thread-multi/CORE -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
          >
          > -Wl,--as-needed -o vim -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM
          >
          > -lICE
          >
          > -lm -lncurses -lelf -lnsl -ldl -L/usr/lib -llua -Wl,-E
          >
          > -Wl,-rpath,/usr/lib/perl5/5.12/linux-thread-multi/CORE
          >
          > -fstack-protector -L/usr/
          >
          > lib/perl5/5.12/linux-thread-multi/CORE -lperl -lnsl -ldl -lm -lcrypt
          >
          > -lutil -lpthread -lc -L/usr/lib/python2.7/config -lpython2.7 -lpthread
          >
          > -
          >
          > ldl -lutil -lm -Xlinker -export-dynamic -L/usr/lib -ltcl8.5 -ldl
          >
          > -lieee -lm -Wl,-R -Wl,/usr/lib -L/usr/lib -lruby -lpthread -lrt -ldl
          >
          > -lcryp
          >
          > t -lm -L/usr/lib
          >
          >
          >
          > Any thoughts, please?
          >
          >
          >
          > Thanks
          >
          > Joe

          Does :help xterm-screens address your need?

          How about http://ubuntuforums.org/showthread.php?t=1684567 or http://www.linuxquestions.org/questions/linux-newbie-8/why-does-vim-clear-the-screen-on-exit-711012/ from the first page of google hits for "vim clear screen"?

          Actually, the very first link YOU gave us tells you a method to fix it. Did it not work? What happened when you tried it?

          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        • joe M
          Hello Ben, Thanks for responding. I am trying to get the terminal shell history to display as it was before entering vim (which is what happens with vi) 1.
          Message 4 of 16 , Aug 28 12:10 PM
          • 0 Attachment
            Hello Ben,

            Thanks for responding.

            I am trying to get the terminal shell history to display as it was
            before entering vim (which is what happens with vi)

            1. When I do this, set t_ti= t_te=, it does not clear the screen on
            exit, but I see the contents of the file that I opened with vim.

            Without the above "set", I get a blank terminal on exit. with the
            above "set", I get the contents of the file that I opened with vim.

            2. The same happens, When I follow the method specified at the url
            http://www.shallowsky.com/linux/noaltscreen.html about using a
            different terminfo file.

            infocmp -C rxvt-unicode-noalt
            # Reconstructed via infocmp from file: /home/j/.terminfo/r/rxvt-unicode-noalt
            rxvt-unicode-noalt|rxvt-unicode terminal (X Window System):\
            :am:bw:eo:hs:km:mi:ms:xn:xo:\
            :co#80:it#8:li#24:lm#0:\
            :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
            :K1=\EOw:K2=\EOu:K3=\EOy:K4=\EOq:K5=\EOs:LE=\E[%dD:\
            :RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ae=\E(B:al=\E[L:\
            :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
            :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\
            :dl=\E[M:do=^J:ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:\
            :ho=\E[H:i1=\E[?47l\E=\E[?1l:ic=\E[@:im=\E[4h:k1=\E[11~:\
            :k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:k6=\E[17~:\
            :k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:kI=\E[2~:kN=\E[6~:\
            :kP=\E[5~:kb=\177:kd=\EOB:ke=\E[?1l\E>:kh=\E[7~:kl=\EOD:\
            :kr=\EOC:ks=\E[?1h\E=:ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:\
            :me=\E[m\017:mr=\E[7m:nd=\E[C:rc=\E8:\
            :..sa=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;:\
            :sc=\E7:se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
            :ts=\E]2;:ue=\E[24m:up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:\
            :ve=\E[?25h:vi=\E[?25l:vs=\E[?25h:
            --(/var/pkgmk/distfiles/vim)
            echo $TERM
            rxvt-unicode-256color
            --(/var/pkgmk/distfiles/vim)
            export TERM=rxvt-unicode-noalt

            3. adding the line: au VimLeave * :!clear, gives a blank screen on exiting vim.

            Thanks
            Joe


            On Tue, Aug 28, 2012 at 2:45 PM, Ben Fritz <fritzophrenic@...> wrote:
            > On Tuesday, August 28, 2012 11:46:43 AM UTC-5, joe M wrote:
            >> Hello,
            >>
            >>
            >>
            >> When I close a vim/vi window from the terminal, I get a screenful of
            >>
            >> blank screen and any previous terminal history is blanked out.
            >>
            >>
            >>
            >> It seems to be a well-known issue as documented at
            >>
            >> http://www.shallowsky.com/linux/noaltscreen.html
            >>
            >>
            >>
            >> It is similar to what is described here, but, instead of viewing the
            >>
            >> files' contents, I get a blank screen.
            >>
            >> http://serverfault.com/questions/270103/gnu-screen-clearing-on-vim-less-etc-exit
            >>
            >>
            >>
            >> my terminal settings:
            >>
            >>
            >>
            >> infocmp -C rxvt-unicode-256color
            >>
            >> # Reconstructed via infocmp from file:
            >>
            >> /usr/share/terminfo/r/rxvt-unicode-256color
            >>
            >> # (untranslatable capabilities removed to fit entry within 1023 bytes)
            >>
            >> rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System):\
            >>
            >> :am:bw:eo:hs:km:mi:ms:xn:xo:\
            >>
            >> :co#80:it#8:li#24:lm#0:\
            >>
            >> :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
            >>
            >> :K1=\EOw:K2=\EOu:K3=\EOy:K4=\EOq:K5=\EOs:LE=\E[%dD:\
            >>
            >> :RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ae=\E(B:al=\E[L:\
            >>
            >> :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
            >>
            >> :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\
            >>
            >> :dl=\E[M:do=^J:ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:\
            >>
            >> :ho=\E[H:i1=\E[!p:ic=\E[@:im=\E[4h:\
            >>
            >> :is=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l:\
            >>
            >> :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\
            >>
            >> :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:\
            >>
            >> :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kd=\E[B:ke=\E>:\
            >>
            >> :kh=\E[7~:kl=\E[D:kr=\E[C:ks=\E=:ku=\E[A:le=^H:mb=\E[5m:\
            >>
            >> :md=\E[1m:me=\E[0m:mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:\
            >>
            >> :se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
            >>
            >> :te=\E[r\E[?1049l:ti=\E[?1049h:ts=\E]2;:ue=\E[24m:\
            >>
            >> :up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?25h:vi=\E[?25l:\
            >>
            >> :vs=\E[?25h:
            >>
            >> --(/tmp)---------------------------------------------------------------------------------------------------------------------(pts/3@master)--
            >>
            >> echo $TERM
            >>
            >> rxvt-unicode-256color
            >>
            >>
            >>
            >> vim :set termcap shows the below:
            >>
            >>
            >>
            >> --- Terminal codes ---
            >>
            >> t_AL=^[[%p1%dL t_CS= t_fs=^G
            >>
            >> t_md=^[[1m t_RV=^[[>c t_us=^[[4m t_xs=
            >>
            >> t_al=^[[L t_CV= t_IE=^G
            >>
            >> t_me=^[[m t_se=^[[27m t_vb= t_ZH=^[[3m
            >>
            >> t_bc= t_ut=y t_IS=^[]1;
            >>
            >> t_mr=^[[7m t_so=^[[7m t_ve=^[[?25h
            >>
            >> t_ZR=^[[23m
            >>
            >> t_cd=^[[J t_da= t_ke=^[[?1l^[> t_ms=y
            >>
            >> t_sr=^[M t_vi=^[[?25l
            >>
            >> t_ce=^[[K t_db= t_ks=^[[?1h^[=
            >>
            >> t_nd=^[[C t_ts=^[]2; t_vs=^[[?25h
            >>
            >> t_cl=^[[H^[[2J t_DL=^[[%p1%dM t_le=^H
            >>
            >> t_op=^[[39;49m t_ti=^[[?1049h t_SI=
            >>
            >> t_Co=256 t_dl=^[[M t_mb=^[[5m
            >>
            >> t_RI=^[[%p1%dC t_ue=^[[m t_EI=
            >>
            >> t_AB=^[[48;5;%p1%dm
            >>
            >> t_AF=^[[38;5;%p1%dm
            >>
            >> t_cm=^[[%i%p1%d;%p2%dH
            >>
            >> t_cs=^[[%i%p1%d;%p2%dr
            >>
            >> t_Sb=%?%p1%{7}%>%t^[[48;5;%p1%dm%e^[[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;
            >>
            >> t_Sf=%?%p1%{7}%>%t^[[38;5;%p1%dm%e^[[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;
            >>
            >> t_te=^[[r^[[?1049l
            >>
            >> t_WP=^[[3;%p1%d;%p2%dt
            >>
            >> t_WS=^[[8;%p1%d;%p2%dt
            >>
            >> --- Terminal keys ---
            >>
            >> t_#2 <S-Home> ^[[7$ t_K4 <kEnd> ^[[4;*~ t_k4 <F4>
            >>
            >> ^[[14;*~ t_kP <PageUp> ^[[5;*~ <xF4> ^[O*S
            >>
            >> t_#4 <S-Left> ^[[d t_K5 <kPageDown> ^[Os t_k5 <F5>
            >>
            >> ^[[15;*~ t_kb <BS> ^? <xEnd> ^[O*F
            >>
            >> t_%1 <Help> ^[[28;*~ t_K6 <kPlus> ^[O*k t_k6 <F6>
            >>
            >> ^[[17;*~ t_kd <Down> ^[O*B <zEnd> ^[[8;*~
            >>
            >> t_%i <S-Right> ^[[c t_K7 <kMinus> ^[O*m t_k7 <F7>
            >>
            >> ^[[18;*~ t_kh <Home> ^[[1;*H <xHome> ^[O*H
            >>
            >> t_&8 <Undo> ^[[26;*~ t_K8 <kDivide> ^[O*o t_k8 <F8>
            >>
            >> ^[[19;*~ t_kl <Left> ^[O*D <zHome> ^[[7;*~
            >>
            >> t_*7 <S-End> ^[[8$ t_K9 <kMultiply> ^[O*j t_k9 <F9>
            >>
            >> ^[[20;*~ t_kr <Right> ^[O*C <xUp> ^[[1;*A
            >>
            >> t_@7 <End> ^[[1;*F t_KA <kEnter> ^[O*M t_k; <F10>
            >>
            >> ^[[21;*~ t_ku <Up> ^[O*A <xDown> ^[[1;*B
            >>
            >> t_F1 <F11> ^[[23;*~ t_KB <kPoint> ^[O*n t_kB <S-Tab>
            >>
            >> ^[[Z <Mouse> ^[[M <xLeft> ^[[1;*D
            >>
            >> t_F2 <F12> ^[[24;*~ t_k1 <F1> ^[[11;*~ t_kD <Del>
            >>
            >> ^[[3~ <xF1> ^[O*P <xRight> ^[[1;*C
            >>
            >> t_K1 <kHome> ^[[1;*~ t_k2 <F2> ^[[12;*~ t_kI <Insert>
            >>
            >> ^[[2;*~ <xF2> ^[O*Q <kDel> ^[[3;*~
            >>
            >> t_K3 <kPageUp> ^[Oy t_k3 <F3> ^[[13;*~ t_kN <PageDown>
            >>
            >> ^[[6;*~ <xF3> ^[O*R
            >>
            >>
            >>
            >>
            >>
            >> vim version below
            >>
            >>
            >>
            >> :version
            >>
            >> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 28 2012 08:09:40)
            >>
            >> Included patches: 1-638
            >>
            >> Compiled by root@master
            >>
            >> Huge version without GUI. Features included (+) or not (-):
            >>
            >> +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset
            >>
            >> +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist
            >>
            >> +cmdline_info +comments +conceal +cryptv +cscope +cursorbind
            >>
            >> +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags
            >>
            >> +eval
            >>
            >> +ex_extra +extra_search +farsi +file_in_path +find_in_path +float
            >>
            >> +folding -footer +fork() -gettext -hangul_input +iconv +insert_expand
            >>
            >> +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds
            >>
            >> +localmap +lua +menu +mksession +modify_fname +mouse -mouseshape
            >>
            >> +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
            >>
            >> +mouse_xterm +mouse_urxvt +mouse_sgr +multi_byte +multi_lang -mzscheme
            >>
            >> +netbeans_intg +path_extra +perl +persistent_undo +postscript +printer
            >>
            >> +profile +python -python3 +quickfix +reltime +rightleft +ruby
            >>
            >> +scrollbind +signs +smartindent -sniff +startuptime +statusline
            >>
            >> -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl
            >>
            >> +terminfo +termresponse +textobjects +title -toolbar +user_commands
            >>
            >> +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
            >>
            >> +wildignore +wildmenu +windows +writebackup +X11 +xfontset -xim
            >>
            >> +xsmp_interact +xterm_clipboard -xterm_save
            >>
            >> system vimrc file: "$VIM/vimrc"
            >>
            >> user vimrc file: "$HOME/.vimrc"
            >>
            >> user exrc file: "$HOME/.exrc"
            >>
            >> fall-back for $VIM: "/usr/share/vim"
            >>
            >> Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -pipe -ftracer
            >>
            >> -fgcse-after-reload -march=core2 -mcx16 -msahf -mpclmul -mpopcnt -msse
            >>
            >> 4.2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param
            >>
            >> l2-cache-size=3072 -mtune=generic -U_FORTIFY_SOURCE
            >>
            >> -D_FORTIFY_SOURCE=1
            >>
            >> -I/usr/include -D_LARGEFILE64_SOURCE=1
            >>
            >> Linking: gcc -L. -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
            >>
            >> -rdynamic -Wl,-export-dynamic -Wl,-E
            >>
            >> -Wl,-rpath,/usr/lib/perl5/5.12/linux
            >>
            >> -thread-multi/CORE -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
            >>
            >> -Wl,--as-needed -o vim -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM
            >>
            >> -lICE
            >>
            >> -lm -lncurses -lelf -lnsl -ldl -L/usr/lib -llua -Wl,-E
            >>
            >> -Wl,-rpath,/usr/lib/perl5/5.12/linux-thread-multi/CORE
            >>
            >> -fstack-protector -L/usr/
            >>
            >> lib/perl5/5.12/linux-thread-multi/CORE -lperl -lnsl -ldl -lm -lcrypt
            >>
            >> -lutil -lpthread -lc -L/usr/lib/python2.7/config -lpython2.7 -lpthread
            >>
            >> -
            >>
            >> ldl -lutil -lm -Xlinker -export-dynamic -L/usr/lib -ltcl8.5 -ldl
            >>
            >> -lieee -lm -Wl,-R -Wl,/usr/lib -L/usr/lib -lruby -lpthread -lrt -ldl
            >>
            >> -lcryp
            >>
            >> t -lm -L/usr/lib
            >>
            >>
            >>
            >> Any thoughts, please?
            >>
            >>
            >>
            >> Thanks
            >>
            >> Joe
            >
            > Does :help xterm-screens address your need?
            >
            > How about http://ubuntuforums.org/showthread.php?t=1684567 or http://www.linuxquestions.org/questions/linux-newbie-8/why-does-vim-clear-the-screen-on-exit-711012/ from the first page of google hits for "vim clear screen"?
            >
            > Actually, the very first link YOU gave us tells you a method to fix it. Did it not work? What happened when you tried it?
            >
            > --
            > You received this message from the "vim_use" maillist.
            > Do not top-post! Type your reply below the text you are replying to.
            > For more information, visit http://www.vim.org/maillist.php

            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          • joe M
            The xterm_save option that the :help xterm-screens talks about is not helping. The vi, that shows the previous terminal history, is also not compiled with that
            Message 5 of 16 , Aug 28 12:21 PM
            • 0 Attachment
              The xterm_save option that the :help xterm-screens talks about is not helping.

              The vi, that shows the previous terminal history, is also not compiled
              with that option. But, vi works without an issue. Whereas, vim does
              not behave that way even if the option is enabled or disabled.

              I changed vim to compile with just "+builtin_terms" instead of
              "++builtin_terms". But, still the same behaviour (blank terminal, no
              terminal history).

              Any thoughts, please?

              Thanks
              Joe

              On Tue, Aug 28, 2012 at 3:10 PM, joe M <joe9mail@...> wrote:
              > Hello Ben,
              >
              > Thanks for responding.
              >
              > I am trying to get the terminal shell history to display as it was
              > before entering vim (which is what happens with vi)
              >
              > 1. When I do this, set t_ti= t_te=, it does not clear the screen on
              > exit, but I see the contents of the file that I opened with vim.
              >
              > Without the above "set", I get a blank terminal on exit. with the
              > above "set", I get the contents of the file that I opened with vim.
              >
              > 2. The same happens, When I follow the method specified at the url
              > http://www.shallowsky.com/linux/noaltscreen.html about using a
              > different terminfo file.
              >
              > infocmp -C rxvt-unicode-noalt
              > # Reconstructed via infocmp from file: /home/j/.terminfo/r/rxvt-unicode-noalt
              > rxvt-unicode-noalt|rxvt-unicode terminal (X Window System):\
              > :am:bw:eo:hs:km:mi:ms:xn:xo:\
              > :co#80:it#8:li#24:lm#0:\
              > :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
              > :K1=\EOw:K2=\EOu:K3=\EOy:K4=\EOq:K5=\EOs:LE=\E[%dD:\
              > :RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ae=\E(B:al=\E[L:\
              > :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
              > :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\
              > :dl=\E[M:do=^J:ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:\
              > :ho=\E[H:i1=\E[?47l\E=\E[?1l:ic=\E[@:im=\E[4h:k1=\E[11~:\
              > :k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:k6=\E[17~:\
              > :k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:kI=\E[2~:kN=\E[6~:\
              > :kP=\E[5~:kb=\177:kd=\EOB:ke=\E[?1l\E>:kh=\E[7~:kl=\EOD:\
              > :kr=\EOC:ks=\E[?1h\E=:ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:\
              > :me=\E[m\017:mr=\E[7m:nd=\E[C:rc=\E8:\
              > :..sa=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;:\
              > :sc=\E7:se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
              > :ts=\E]2;:ue=\E[24m:up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:\
              > :ve=\E[?25h:vi=\E[?25l:vs=\E[?25h:
              > --(/var/pkgmk/distfiles/vim)
              > echo $TERM
              > rxvt-unicode-256color
              > --(/var/pkgmk/distfiles/vim)
              > export TERM=rxvt-unicode-noalt
              >
              > 3. adding the line: au VimLeave * :!clear, gives a blank screen on exiting vim.
              >
              > Thanks
              > Joe
              >
              >
              > On Tue, Aug 28, 2012 at 2:45 PM, Ben Fritz <fritzophrenic@...> wrote:
              >> On Tuesday, August 28, 2012 11:46:43 AM UTC-5, joe M wrote:
              >>> Hello,
              >>>
              >>>
              >>>
              >>> When I close a vim/vi window from the terminal, I get a screenful of
              >>>
              >>> blank screen and any previous terminal history is blanked out.
              >>>
              >>>
              >>>
              >>> It seems to be a well-known issue as documented at
              >>>
              >>> http://www.shallowsky.com/linux/noaltscreen.html
              >>>
              >>>
              >>>
              >>> It is similar to what is described here, but, instead of viewing the
              >>>
              >>> files' contents, I get a blank screen.
              >>>
              >>> http://serverfault.com/questions/270103/gnu-screen-clearing-on-vim-less-etc-exit
              >>>
              >>>
              >>>
              >>> my terminal settings:
              >>>
              >>>
              >>>
              >>> infocmp -C rxvt-unicode-256color
              >>>
              >>> # Reconstructed via infocmp from file:
              >>>
              >>> /usr/share/terminfo/r/rxvt-unicode-256color
              >>>
              >>> # (untranslatable capabilities removed to fit entry within 1023 bytes)
              >>>
              >>> rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System):\
              >>>
              >>> :am:bw:eo:hs:km:mi:ms:xn:xo:\
              >>>
              >>> :co#80:it#8:li#24:lm#0:\
              >>>
              >>> :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
              >>>
              >>> :K1=\EOw:K2=\EOu:K3=\EOy:K4=\EOq:K5=\EOs:LE=\E[%dD:\
              >>>
              >>> :RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ae=\E(B:al=\E[L:\
              >>>
              >>> :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
              >>>
              >>> :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\
              >>>
              >>> :dl=\E[M:do=^J:ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:\
              >>>
              >>> :ho=\E[H:i1=\E[!p:ic=\E[@:im=\E[4h:\
              >>>
              >>> :is=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l:\
              >>>
              >>> :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\
              >>>
              >>> :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:\
              >>>
              >>> :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kd=\E[B:ke=\E>:\
              >>>
              >>> :kh=\E[7~:kl=\E[D:kr=\E[C:ks=\E=:ku=\E[A:le=^H:mb=\E[5m:\
              >>>
              >>> :md=\E[1m:me=\E[0m:mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:\
              >>>
              >>> :se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
              >>>
              >>> :te=\E[r\E[?1049l:ti=\E[?1049h:ts=\E]2;:ue=\E[24m:\
              >>>
              >>> :up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?25h:vi=\E[?25l:\
              >>>
              >>> :vs=\E[?25h:
              >>>
              >>> --(/tmp)---------------------------------------------------------------------------------------------------------------------(pts/3@master)--
              >>>
              >>> echo $TERM
              >>>
              >>> rxvt-unicode-256color
              >>>
              >>>
              >>>
              >>> vim :set termcap shows the below:
              >>>
              >>>
              >>>
              >>> --- Terminal codes ---
              >>>
              >>> t_AL=^[[%p1%dL t_CS= t_fs=^G
              >>>
              >>> t_md=^[[1m t_RV=^[[>c t_us=^[[4m t_xs=
              >>>
              >>> t_al=^[[L t_CV= t_IE=^G
              >>>
              >>> t_me=^[[m t_se=^[[27m t_vb= t_ZH=^[[3m
              >>>
              >>> t_bc= t_ut=y t_IS=^[]1;
              >>>
              >>> t_mr=^[[7m t_so=^[[7m t_ve=^[[?25h
              >>>
              >>> t_ZR=^[[23m
              >>>
              >>> t_cd=^[[J t_da= t_ke=^[[?1l^[> t_ms=y
              >>>
              >>> t_sr=^[M t_vi=^[[?25l
              >>>
              >>> t_ce=^[[K t_db= t_ks=^[[?1h^[=
              >>>
              >>> t_nd=^[[C t_ts=^[]2; t_vs=^[[?25h
              >>>
              >>> t_cl=^[[H^[[2J t_DL=^[[%p1%dM t_le=^H
              >>>
              >>> t_op=^[[39;49m t_ti=^[[?1049h t_SI=
              >>>
              >>> t_Co=256 t_dl=^[[M t_mb=^[[5m
              >>>
              >>> t_RI=^[[%p1%dC t_ue=^[[m t_EI=
              >>>
              >>> t_AB=^[[48;5;%p1%dm
              >>>
              >>> t_AF=^[[38;5;%p1%dm
              >>>
              >>> t_cm=^[[%i%p1%d;%p2%dH
              >>>
              >>> t_cs=^[[%i%p1%d;%p2%dr
              >>>
              >>> t_Sb=%?%p1%{7}%>%t^[[48;5;%p1%dm%e^[[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;
              >>>
              >>> t_Sf=%?%p1%{7}%>%t^[[38;5;%p1%dm%e^[[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;
              >>>
              >>> t_te=^[[r^[[?1049l
              >>>
              >>> t_WP=^[[3;%p1%d;%p2%dt
              >>>
              >>> t_WS=^[[8;%p1%d;%p2%dt
              >>>
              >>> --- Terminal keys ---
              >>>
              >>> t_#2 <S-Home> ^[[7$ t_K4 <kEnd> ^[[4;*~ t_k4 <F4>
              >>>
              >>> ^[[14;*~ t_kP <PageUp> ^[[5;*~ <xF4> ^[O*S
              >>>
              >>> t_#4 <S-Left> ^[[d t_K5 <kPageDown> ^[Os t_k5 <F5>
              >>>
              >>> ^[[15;*~ t_kb <BS> ^? <xEnd> ^[O*F
              >>>
              >>> t_%1 <Help> ^[[28;*~ t_K6 <kPlus> ^[O*k t_k6 <F6>
              >>>
              >>> ^[[17;*~ t_kd <Down> ^[O*B <zEnd> ^[[8;*~
              >>>
              >>> t_%i <S-Right> ^[[c t_K7 <kMinus> ^[O*m t_k7 <F7>
              >>>
              >>> ^[[18;*~ t_kh <Home> ^[[1;*H <xHome> ^[O*H
              >>>
              >>> t_&8 <Undo> ^[[26;*~ t_K8 <kDivide> ^[O*o t_k8 <F8>
              >>>
              >>> ^[[19;*~ t_kl <Left> ^[O*D <zHome> ^[[7;*~
              >>>
              >>> t_*7 <S-End> ^[[8$ t_K9 <kMultiply> ^[O*j t_k9 <F9>
              >>>
              >>> ^[[20;*~ t_kr <Right> ^[O*C <xUp> ^[[1;*A
              >>>
              >>> t_@7 <End> ^[[1;*F t_KA <kEnter> ^[O*M t_k; <F10>
              >>>
              >>> ^[[21;*~ t_ku <Up> ^[O*A <xDown> ^[[1;*B
              >>>
              >>> t_F1 <F11> ^[[23;*~ t_KB <kPoint> ^[O*n t_kB <S-Tab>
              >>>
              >>> ^[[Z <Mouse> ^[[M <xLeft> ^[[1;*D
              >>>
              >>> t_F2 <F12> ^[[24;*~ t_k1 <F1> ^[[11;*~ t_kD <Del>
              >>>
              >>> ^[[3~ <xF1> ^[O*P <xRight> ^[[1;*C
              >>>
              >>> t_K1 <kHome> ^[[1;*~ t_k2 <F2> ^[[12;*~ t_kI <Insert>
              >>>
              >>> ^[[2;*~ <xF2> ^[O*Q <kDel> ^[[3;*~
              >>>
              >>> t_K3 <kPageUp> ^[Oy t_k3 <F3> ^[[13;*~ t_kN <PageDown>
              >>>
              >>> ^[[6;*~ <xF3> ^[O*R
              >>>
              >>>
              >>>
              >>>
              >>>
              >>> vim version below
              >>>
              >>>
              >>>
              >>> :version
              >>>
              >>> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 28 2012 08:09:40)
              >>>
              >>> Included patches: 1-638
              >>>
              >>> Compiled by root@master
              >>>
              >>> Huge version without GUI. Features included (+) or not (-):
              >>>
              >>> +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset
              >>>
              >>> +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist
              >>>
              >>> +cmdline_info +comments +conceal +cryptv +cscope +cursorbind
              >>>
              >>> +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags
              >>>
              >>> +eval
              >>>
              >>> +ex_extra +extra_search +farsi +file_in_path +find_in_path +float
              >>>
              >>> +folding -footer +fork() -gettext -hangul_input +iconv +insert_expand
              >>>
              >>> +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds
              >>>
              >>> +localmap +lua +menu +mksession +modify_fname +mouse -mouseshape
              >>>
              >>> +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
              >>>
              >>> +mouse_xterm +mouse_urxvt +mouse_sgr +multi_byte +multi_lang -mzscheme
              >>>
              >>> +netbeans_intg +path_extra +perl +persistent_undo +postscript +printer
              >>>
              >>> +profile +python -python3 +quickfix +reltime +rightleft +ruby
              >>>
              >>> +scrollbind +signs +smartindent -sniff +startuptime +statusline
              >>>
              >>> -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white +tcl
              >>>
              >>> +terminfo +termresponse +textobjects +title -toolbar +user_commands
              >>>
              >>> +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
              >>>
              >>> +wildignore +wildmenu +windows +writebackup +X11 +xfontset -xim
              >>>
              >>> +xsmp_interact +xterm_clipboard -xterm_save
              >>>
              >>> system vimrc file: "$VIM/vimrc"
              >>>
              >>> user vimrc file: "$HOME/.vimrc"
              >>>
              >>> user exrc file: "$HOME/.exrc"
              >>>
              >>> fall-back for $VIM: "/usr/share/vim"
              >>>
              >>> Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -pipe -ftracer
              >>>
              >>> -fgcse-after-reload -march=core2 -mcx16 -msahf -mpclmul -mpopcnt -msse
              >>>
              >>> 4.2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param
              >>>
              >>> l2-cache-size=3072 -mtune=generic -U_FORTIFY_SOURCE
              >>>
              >>> -D_FORTIFY_SOURCE=1
              >>>
              >>> -I/usr/include -D_LARGEFILE64_SOURCE=1
              >>>
              >>> Linking: gcc -L. -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
              >>>
              >>> -rdynamic -Wl,-export-dynamic -Wl,-E
              >>>
              >>> -Wl,-rpath,/usr/lib/perl5/5.12/linux
              >>>
              >>> -thread-multi/CORE -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
              >>>
              >>> -Wl,--as-needed -o vim -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM
              >>>
              >>> -lICE
              >>>
              >>> -lm -lncurses -lelf -lnsl -ldl -L/usr/lib -llua -Wl,-E
              >>>
              >>> -Wl,-rpath,/usr/lib/perl5/5.12/linux-thread-multi/CORE
              >>>
              >>> -fstack-protector -L/usr/
              >>>
              >>> lib/perl5/5.12/linux-thread-multi/CORE -lperl -lnsl -ldl -lm -lcrypt
              >>>
              >>> -lutil -lpthread -lc -L/usr/lib/python2.7/config -lpython2.7 -lpthread
              >>>
              >>> -
              >>>
              >>> ldl -lutil -lm -Xlinker -export-dynamic -L/usr/lib -ltcl8.5 -ldl
              >>>
              >>> -lieee -lm -Wl,-R -Wl,/usr/lib -L/usr/lib -lruby -lpthread -lrt -ldl
              >>>
              >>> -lcryp
              >>>
              >>> t -lm -L/usr/lib
              >>>
              >>>
              >>>
              >>> Any thoughts, please?
              >>>
              >>>
              >>>
              >>> Thanks
              >>>
              >>> Joe
              >>
              >> Does :help xterm-screens address your need?
              >>
              >> How about http://ubuntuforums.org/showthread.php?t=1684567 or http://www.linuxquestions.org/questions/linux-newbie-8/why-does-vim-clear-the-screen-on-exit-711012/ from the first page of google hits for "vim clear screen"?
              >>
              >> Actually, the very first link YOU gave us tells you a method to fix it. Did it not work? What happened when you tried it?
              >>
              >> --
              >> You received this message from the "vim_use" maillist.
              >> Do not top-post! Type your reply below the text you are replying to.
              >> For more information, visit http://www.vim.org/maillist.php

              --
              You received this message from the "vim_use" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php
            • John Little
              ... FWIW, my vim, 7.3.618, in konsole, (or xterm (271) or gnome-terminal) TERM=xterm, with no attention to this on my part, behaves the way you want. Comparing
              Message 6 of 16 , Aug 28 11:40 PM
              • 0 Attachment
                > Any thoughts, please?

                FWIW, my vim, 7.3.618, in konsole, (or xterm (271) or gnome-terminal) TERM=xterm, with no attention to this on my part, behaves the way you want.

                Comparing my infocmp -C output to yours, mine has

                te=\E[?1049l
                is=\E[!p\E[?3;4l\E[4l\E>

                where yours has

                te=\E[r\E[?1049l
                is=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l

                \E?1049h and \E?1049l switch in and out of alternate screen mode, which is what you want, I think. However, your "is" is switching out, and is clearing the screen, so I suspect it is the cause of your trouble.

                Running
                echo -e '\e[r\e[m\e[2J\e[?1;3;4;5;6;9;66;1000;1001;1049l\e[4l'
                in bash clears my screen.

                Maybe your vi is using termcap, and vim is using terminfo, giving a difference in behaviour... just a thought.

                I suggest setting TERM=xterm, maybe that will work for you, or at least be informative.

                Also, a xterm control sequence page mentions a titeInhibit X resource which if you had would be confusing things.

                Regards, John Little

                --
                You received this message from the "vim_use" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php
              • joe M
                Hello John, Thanks a lot for your analysis. Your observations are spot-on. I took my t_is string and started echo ing it on the terminal by removing different
                Message 7 of 16 , Aug 29 6:47 AM
                • 0 Attachment
                  Hello John,

                  Thanks a lot for your analysis. Your observations are spot-on.

                  I took my t_is string and started echo'ing it on the terminal by
                  removing different escape codes and realised that "\E[2J" is
                  responsible for clearing the terminal.

                  I removed that and echoed the rest and this is what I received:

                  --(/tmp) -- my shell prompt
                  infocmp -C rxvt-unicode-256color
                  # Reconstructed via infocmp from file:
                  /usr/share/terminfo/r/rxvt-unicode-256color
                  # (untranslatable capabilities removed to fit entry within 1023 bytes)
                  rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System):\
                  :am:bw:eo:hs:km:mi:ms:xn:xo:\
                  :co#80:it#8:li#24:lm#0:\
                  :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
                  :K1=\EOw:K2=\EOu:K3=\EOy:K4=\EOq:K5=\EOs:LE=\E[%dD:\
                  :RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ae=\E(B:al=\E[L:\
                  :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
                  :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\
                  :dl=\E[M:do=^J:ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:\
                  :ho=\E[H:i1=\E[!p:ic=\E[@:im=\E[4h:\
                  :is=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l:\
                  :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\
                  :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:\
                  :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kd=\E[B:ke=\E>:\
                  :kh=\E[7~:kl=\E[D:kr=\E[C:ks=\E=:ku=\E[A:le=^H:mb=\E[5m:\
                  :md=\E[1m:me=\E[0m:mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:\
                  :se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
                  :te=\E[r\E[?1049l:ti=\E[?1049h:ts=\E]2;:ue=\E[24m:\
                  :up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?25h:vi=\E[?25l:\
                  :vs=\E[?25h:
                  --(/tmp)
                  echo "\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l"
                  r

                  " | 180x71 |
                  pts/3@master\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l
                  --(/tmp)

                  The above behaviour is what I want from vim:

                  I changed vimrc with these different settings and realise that they
                  are not affecting vim's behaviour with respect to the blank screen (I
                  can see some changes in how vim is acting when changing t_IS though)

                  "set t_is=\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l
                  set t_IS=\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l
                  " set t_is=
                  " set t_IS=

                  This made me think that changing the terminfo is a better idea.

                  I changed the terminfo as below, by removing the t_is in the terminfo files:

                  --(/tmp)
                  infocmp -C xterm
                  # Reconstructed via infocmp from file: /usr/share/terminfo/x/xterm
                  xterm|xterm terminal emulator (X Window System):\
                  :am:bs:km:mi:ms:xn:\
                  :co#80:it#8:li#24:\
                  :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
                  :K2=\EOE:LE=\E[%dD:RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:\
                  :UP=\E[%dA:ae=\E(B:al=\E[L:as=\E(0:bl=^G:bt=\E[Z:cd=\E[J:\
                  :ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cr=^M:\
                  :cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:do=^J:ec=\E[%dX:\
                  :ei=\E[4l:ho=\E[H:im=\E[4h:is=\E[!p\E[?3;4l\E[4l\E>:\
                  :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\
                  :k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:kI=\E[2~:kN=\E[6~:\
                  :kP=\E[5~:kb=^H:kd=\EOB:ke=\E[?1l\E>:kh=\EOH:kl=\EOD:\
                  :kr=\EOC:ks=\E[?1h\E=:ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:\
                  :me=\E[0m:mm=\E[?1034h:mo=\E[?1034l:mr=\E[7m:nd=\E[C:\
                  :rc=\E8:\
                  :..sa=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m:\
                  :sc=\E7:se=\E[27m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
                  :te=\E[?1049l:ti=\E[?1049h:ue=\E[24m:up=\E[A:us=\E[4m:\
                  :vb=\E[?5h\E[?5l:ve=\E[?12l\E[?25h:vi=\E[?25l:\
                  :vs=\E[?12;25h:
                  --(/tmp)
                  infocmp -C rxvt-unicode-256color
                  # Reconstructed via infocmp from file: /home/j/.terminfo/r/rxvt-unicode-256color
                  rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System):\
                  :am:bw:eo:hs:km:mi:ms:xn:xo:\
                  :co#80:it#8:li#24:lm#0:\
                  :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
                  :K1=\EOw:K2=\EOu:K3=\EOy:K4=\EOq:K5=\EOs:LE=\E[%dD:\
                  :RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ae=\E(B:al=\E[L:\
                  :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
                  :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\
                  :dl=\E[M:do=^J:ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:\
                  :ho=\E[H:i1=\E[!p:ic=\E[@:im=\E[4h:is=:k1=\E[11~:k2=\E[12~:\
                  :k3=\E[13~:k4=\E[14~:k5=\E[15~:k6=\E[17~:k7=\E[18~:\
                  :k8=\E[19~:k9=\E[20~:kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:\
                  :kb=\177:kd=\E[B:ke=\E>:kh=\E[7~:kl=\E[D:kr=\E[C:ks=\E=:\
                  :ku=\E[A:le=^H:mb=\E[5m:md=\E[1m:me=\E[0m:mr=\E[7m:nd=\E[C:\
                  :nw=^M^J:rc=\E8:sc=\E7:se=\E[27m:sf=^J:so=\E[7m:sr=\EM:\
                  :st=\EH:ta=^I:te=\E[r\E[?1049l:ti=\E[?1049h:ts=\E]2;:\
                  :ue=\E[24m:up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?25h:\
                  :vi=\E[?25l:vs=\E[?25h:
                  --(/tmp)
                  infocmp -C rxvt-unicode-256color | grep -i is
                  :ho=\E[H:i1=\E[!p:ic=\E[@:im=\E[4h:is=:k1=\E[11~:k2=\E[12~:\
                  --(/tmp)
                  infocmp -C xterm | grep -i is
                  :ei=\E[4l:ho=\E[H:im=\E[4h:is=\E[!p\E[?3;4l\E[4l\E>:\
                  --(/tmp)

                  even with export TERM=xterm or rxvt-unicode-256color, I am still
                  getting the same behaviour.

                  It might be a lot simpler if I can tell vim to behave as vi does. But,
                  even if I do that, I probably will have issues with colors in files,
                  etc. Any thoughts on this, please?

                  I noticed this in my terminfo file: cl=\E[H\E[2J: and removed the
                  \E[2J from that and tried it. But, that did not change the behavioiur
                  much.

                  At this point, I guess, the only option is to read up on the terminfo
                  codes and see what else could be affecting it.

                  Can you please let me know if you can think of any better ideas?

                  Thanks
                  Joe


                  On Wed, Aug 29, 2012 at 2:58 AM, John Little <John.B.Little@...> wrote:
                  > See my post in vim_use. I reckon the initialization string is the culprit. If it is sent before ti, it clears the stuff you want kept, and if after, makes vim not use the alternate buffer.
                  >
                  > Regards, John Little
                  >
                  > --
                  > You received this message from the "vim_dev" maillist.
                  > Do not top-post! Type your reply below the text you are replying to.
                  > For more information, visit http://www.vim.org/maillist.php

                  --
                  You received this message from the "vim_use" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php
                • John Little
                  ... I m not sure now. I ve installed rxvt-unicode-256color (from the Ubuntu oneiric/universe repository), and it has what I thought was the problematic
                  Message 8 of 16 , Aug 30 5:05 AM
                  • 0 Attachment
                    On Thursday, August 30, 2012 1:47:49 AM UTC+12, joe M wrote:

                    > Thanks a lot for your analysis. Your observations are spot-on.

                    I'm not sure now. I've installed rxvt-unicode-256color (from the Ubuntu oneiric/universe repository), and it has what I thought was the problematic initialization string, but does not show your problem with vim.

                    The infocmp -C output is different from yours, in that mine complains:

                    # (untranslatable capabilities removed to fit entry within 1023 bytes)

                    I'll append the terminfo output (not using -C). You might like to use tic to compile this, perhaps it's a later version than yours.

                    Perhaps you have some other kludge interfering with the alternate display switch. Some people dislike it, especially for viewing man pages, and use various means to turn it off.

                    Regards, John

                    Reconstructed via infocmp from file: /usr/share/terminfo/r/rxvt-unicode-256color
                    rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System),
                    am, bce, bw, ccc, eo, hs, km, mc5i, mir, msgr, npc, xenl, xon,
                    btns#5, colors#256, cols#80, it#8, lines#24, lm#0, ncv#0,
                    pairs#32767,
                    acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
                    bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
                    clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M,
                    csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
                    cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
                    cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
                    cvvis=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
                    dl1=\E[M, dsl=\E]2;\007, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
                    el1=\E[1K, enacs=, flash=\E[?5h$<20/>\E[?5l, fsl=^G,
                    home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
                    ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, indn=\E[%p1%dS,
                    initc=\E]4;%p1%d;rgb\:%p2%{65535}%*%{1000}%/%4.4X/%p3%{65535}%*%{1000}%/%4.4X/%p4%{65535}%*%{1000}%/%4.4X\E\\,
                    is1=\E[!p,
                    is2=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l,
                    kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kIC=\E[2$, kLFT=\E[d,
                    kNXT=\E[6$, kPRV=\E[5$, kRIT=\E[c, ka1=\EOw, ka3=\EOy,
                    kb2=\EOu, kbs=\177, kc1=\EOq, kc3=\EOs, kcbt=\E[Z,
                    kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
                    kdch1=\E[3~, kel=\E[8\^, kend=\E[8~, kent=\EOM, kf1=\E[11~,
                    kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
                    kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
                    kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~,
                    kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~,
                    kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khome=\E[7~,
                    kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, kslt=\E[4~,
                    mc0=\E[i, mc4=\E[4i, mc5=\E[5i, op=\E[39;49m, rc=\E8,
                    rev=\E[7m, ri=\EM, rin=\E[%p1%dT, ritm=\E[23m, rmacs=\E(B,
                    rmam=\E[?7l, rmcup=\E[r\E[?1049l, rmir=\E[4l, rmkx=\E>,
                    rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
                    rs2=\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l,
                    s0ds=\E(B, s1ds=\E(0, s2ds=\E*B, s3ds=\E+B, sc=\E7,
                    setab=\E[48;5;%p1%dm, setaf=\E[38;5;%p1%dm,
                    setb=%?%p1%{7}%>%t\E[48;5;%p1%dm%e\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;,
                    setf=%?%p1%{7}%>%t\E[38;5;%p1%dm%e\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;,
                    sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;,
                    sgr0=\E[m\E(B, sitm=\E[3m, smacs=\E(0, smam=\E[?7h,
                    smcup=\E[?1049h, smir=\E[4h, smkx=\E=, smso=\E[7m,
                    smul=\E[4m, tbc=\E[3g, tsl=\E]2;, u6=\E[%i%d;%dR, u7=\E[6n,
                    u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd,

                    --
                    You received this message from the "vim_use" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php
                  • joe M
                    ... Hello John, Thanks for responding. My infocmp is the same as yours. My infocmp is attached. ... That is an interesting observation. Will have to check on
                    Message 9 of 16 , Aug 30 7:26 AM
                    • 0 Attachment
                      u, Aug 30, 2012 at 8:05 AM, John Little <John.B.Little@...> wrote:
                      > On Thursday, August 30, 2012 1:47:49 AM UTC+12, joe M wrote:
                      >
                      >> Thanks a lot for your analysis. Your observations are spot-on.
                      >
                      > I'm not sure now. I've installed rxvt-unicode-256color (from the Ubuntu oneiric/universe repository), and it has what I thought was the problematic initialization string, but does not show your problem with vim.
                      >
                      > The infocmp -C output is different from yours, in that mine complains:
                      >
                      > # (untranslatable capabilities removed to fit entry within 1023 bytes)
                      >
                      > I'll append the terminfo output (not using -C). You might like to use tic to compile this, perhaps it's a later version than yours.
                      >
                      > Perhaps you have some other kludge interfering with the alternate display switch. Some people dislike it, especially for viewing man pages, and use various means to turn it off.
                      >
                      > Regards, John
                      >
                      > Reconstructed via infocmp from file: /usr/share/terminfo/r/rxvt-unicode-256color
                      > rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System),
                      > am, bce, bw, ccc, eo, hs, km, mc5i, mir, msgr, npc, xenl, xon,
                      > btns#5, colors#256, cols#80, it#8, lines#24, lm#0, ncv#0,
                      > pairs#32767,
                      > acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
                      > bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
                      > clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M,
                      > csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
                      > cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
                      > cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
                      > cvvis=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
                      > dl1=\E[M, dsl=\E]2;\007, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
                      > el1=\E[1K, enacs=, flash=\E[?5h$<20/>\E[?5l, fsl=^G,
                      > home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
                      > ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, indn=\E[%p1%dS,
                      > initc=\E]4;%p1%d;rgb\:%p2%{65535}%*%{1000}%/%4.4X/%p3%{65535}%*%{1000}%/%4.4X/%p4%{65535}%*%{1000}%/%4.4X\E\\,
                      > is1=\E[!p,
                      > is2=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l,
                      > kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kIC=\E[2$, kLFT=\E[d,
                      > kNXT=\E[6$, kPRV=\E[5$, kRIT=\E[c, ka1=\EOw, ka3=\EOy,
                      > kb2=\EOu, kbs=\177, kc1=\EOq, kc3=\EOs, kcbt=\E[Z,
                      > kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
                      > kdch1=\E[3~, kel=\E[8\^, kend=\E[8~, kent=\EOM, kf1=\E[11~,
                      > kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
                      > kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
                      > kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~,
                      > kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~,
                      > kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khome=\E[7~,
                      > kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, kslt=\E[4~,
                      > mc0=\E[i, mc4=\E[4i, mc5=\E[5i, op=\E[39;49m, rc=\E8,
                      > rev=\E[7m, ri=\EM, rin=\E[%p1%dT, ritm=\E[23m, rmacs=\E(B,
                      > rmam=\E[?7l, rmcup=\E[r\E[?1049l, rmir=\E[4l, rmkx=\E>,
                      > rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
                      > rs2=\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l,
                      > s0ds=\E(B, s1ds=\E(0, s2ds=\E*B, s3ds=\E+B, sc=\E7,
                      > setab=\E[48;5;%p1%dm, setaf=\E[38;5;%p1%dm,
                      > setb=%?%p1%{7}%>%t\E[48;5;%p1%dm%e\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;,
                      > setf=%?%p1%{7}%>%t\E[38;5;%p1%dm%e\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;,
                      > sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;,
                      > sgr0=\E[m\E(B, sitm=\E[3m, smacs=\E(0, smam=\E[?7h,
                      > smcup=\E[?1049h, smir=\E[4h, smkx=\E=, smso=\E[7m,
                      > smul=\E[4m, tbc=\E[3g, tsl=\E]2;, u6=\E[%i%d;%dR, u7=\E[6n,
                      > u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd,
                      >
                      > --
                      > You received this message from the "vim_use" maillist.
                      > Do not top-post! Type your reply below the text you are replying to.
                      > For more information, visit http://www.vim.org/maillist.php

                      Hello John,

                      Thanks for responding.

                      My infocmp is the same as yours. My infocmp is attached.

                      > Perhaps you have some other kludge interfering with the alternate display switch. Some people dislike it, especially for viewing man pages, and use various means to turn it off.

                      That is an interesting observation. Will have to check on this.

                      Thanks
                      Joe

                      --
                      You received this message from the "vim_use" maillist.
                      Do not top-post! Type your reply below the text you are replying to.
                      For more information, visit http://www.vim.org/maillist.php
                    • joe M
                      ... Looks like this has something to do with 9.15 rxvt-unicode behaviour and the latest vim from mercurial repo. The way urxvt works in this case that it just
                      Message 10 of 16 , Aug 30 10:34 AM
                      • 0 Attachment
                        On Thu, Aug 30, 2012 at 10:26 AM, joe M <joe9mail@...> wrote:
                        > u, Aug 30, 2012 at 8:05 AM, John Little <John.B.Little@...> wrote:
                        >> On Thursday, August 30, 2012 1:47:49 AM UTC+12, joe M wrote:
                        >>
                        >>> Thanks a lot for your analysis. Your observations are spot-on.
                        >>
                        >> I'm not sure now. I've installed rxvt-unicode-256color (from the Ubuntu oneiric/universe repository), and it has what I thought was the problematic initialization string, but does not show your problem with vim.
                        >>
                        >> The infocmp -C output is different from yours, in that mine complains:
                        >>
                        >> # (untranslatable capabilities removed to fit entry within 1023 bytes)
                        >>
                        >> I'll append the terminfo output (not using -C). You might like to use tic to compile this, perhaps it's a later version than yours.
                        >>
                        >> Perhaps you have some other kludge interfering with the alternate display switch. Some people dislike it, especially for viewing man pages, and use various means to turn it off.
                        >>
                        >> Regards, John
                        >>
                        >> Reconstructed via infocmp from file: /usr/share/terminfo/r/rxvt-unicode-256color
                        >> rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System),
                        >> am, bce, bw, ccc, eo, hs, km, mc5i, mir, msgr, npc, xenl, xon,
                        >> btns#5, colors#256, cols#80, it#8, lines#24, lm#0, ncv#0,
                        >> pairs#32767,
                        >> acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
                        >> bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
                        >> clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M,
                        >> csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
                        >> cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
                        >> cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
                        >> cvvis=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
                        >> dl1=\E[M, dsl=\E]2;\007, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
                        >> el1=\E[1K, enacs=, flash=\E[?5h$<20/>\E[?5l, fsl=^G,
                        >> home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
                        >> ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, indn=\E[%p1%dS,
                        >> initc=\E]4;%p1%d;rgb\:%p2%{65535}%*%{1000}%/%4.4X/%p3%{65535}%*%{1000}%/%4.4X/%p4%{65535}%*%{1000}%/%4.4X\E\\,
                        >> is1=\E[!p,
                        >> is2=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l,
                        >> kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kIC=\E[2$, kLFT=\E[d,
                        >> kNXT=\E[6$, kPRV=\E[5$, kRIT=\E[c, ka1=\EOw, ka3=\EOy,
                        >> kb2=\EOu, kbs=\177, kc1=\EOq, kc3=\EOs, kcbt=\E[Z,
                        >> kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
                        >> kdch1=\E[3~, kel=\E[8\^, kend=\E[8~, kent=\EOM, kf1=\E[11~,
                        >> kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
                        >> kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
                        >> kf18=\E[32~, kf19=\E[33~, kf2=\E[12~, kf20=\E[34~,
                        >> kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~,
                        >> kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khome=\E[7~,
                        >> kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~, kslt=\E[4~,
                        >> mc0=\E[i, mc4=\E[4i, mc5=\E[5i, op=\E[39;49m, rc=\E8,
                        >> rev=\E[7m, ri=\EM, rin=\E[%p1%dT, ritm=\E[23m, rmacs=\E(B,
                        >> rmam=\E[?7l, rmcup=\E[r\E[?1049l, rmir=\E[4l, rmkx=\E>,
                        >> rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
                        >> rs2=\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l,
                        >> s0ds=\E(B, s1ds=\E(0, s2ds=\E*B, s3ds=\E+B, sc=\E7,
                        >> setab=\E[48;5;%p1%dm, setaf=\E[38;5;%p1%dm,
                        >> setb=%?%p1%{7}%>%t\E[48;5;%p1%dm%e\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;,
                        >> setf=%?%p1%{7}%>%t\E[38;5;%p1%dm%e\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;,
                        >> sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;,
                        >> sgr0=\E[m\E(B, sitm=\E[3m, smacs=\E(0, smam=\E[?7h,
                        >> smcup=\E[?1049h, smir=\E[4h, smkx=\E=, smso=\E[7m,
                        >> smul=\E[4m, tbc=\E[3g, tsl=\E]2;, u6=\E[%i%d;%dR, u7=\E[6n,
                        >> u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd,
                        >>
                        >> --
                        >> You received this message from the "vim_use" maillist.
                        >> Do not top-post! Type your reply below the text you are replying to.
                        >> For more information, visit http://www.vim.org/maillist.php
                        >
                        > Hello John,
                        >
                        > Thanks for responding.
                        >
                        > My infocmp is the same as yours. My infocmp is attached.
                        >
                        >> Perhaps you have some other kludge interfering with the alternate display switch. Some people dislike it, especially for viewing man pages, and use various means to turn it off.
                        >
                        > That is an interesting observation. Will have to check on this.
                        >
                        > Thanks
                        > Joe

                        Looks like this has something to do with 9.15 rxvt-unicode behaviour
                        and the latest vim from mercurial repo.

                        "The way urxvt works in this case that it just positions the cursor to
                        the top row and then just erases everything below that point. This
                        means you lose valuable lines from the scrollback. Example: type "seq
                        1000", press ctr-L. Now you won't see the last lines of the command's
                        output!" -- this is exactly what is happening in my case.

                        I got that from https://bbs.archlinux.org/viewtopic.php?id=129302

                        But, the patch noted in that discussion is not helping.

                        Anyway, just a heads-up if anyone is interested.

                        Thanks
                        Joe

                        --
                        You received this message from the "vim_use" maillist.
                        Do not top-post! Type your reply below the text you are replying to.
                        For more information, visit http://www.vim.org/maillist.php
                      • Chris Jones
                        On Thu, Aug 30, 2012 at 01:34:10PM EDT, joe M wrote: [..] ... I certainly do. Thanks for bringing this to the list s attention. Reading through the thread, I m
                        Message 11 of 16 , Aug 30 10:27 PM
                        • 0 Attachment
                          On Thu, Aug 30, 2012 at 01:34:10PM EDT, joe M wrote:

                          [..]

                          > Anyway, just a heads-up if anyone is interested.

                          I certainly do. Thanks for bringing this to the list's attention.

                          Reading through the thread, I'm pretty sure you stated somewhere along
                          the line that the behavior you reported occurs when you run ‘vim’ and
                          does not occur when you run ‘vi’.

                          On my (debian) system, vi and vim both point to the same executable.

                          And here at least, whatever the terminal, both behave the same way in
                          this respect, namely that the screen before I invoke vi/vim is not
                          restored to its initial state -- that's the way I have set it up to suit
                          my requirements.

                          I find it a little suspicious that the same executable should behave
                          differently regarding something that is not clearly related to editing
                          itself and differences between vi and vim dure to their different
                          capabilities just because you invoke the program in two different ways.

                          Mind you, there may be a good reason for that, and I am just not aware
                          of it.

                          All the same, assuming you are running your tests on the same system,
                          something you may want to check is the full path of the vi and the vim
                          executable. So that we know precisely what gets executed.

                          This should provide the full path:

                          | % type vim
                          | vim is /usr/bin/vim
                          | % type vi
                          | vi is /usr/bin/vi

                          You could then use the file command to determine if they point directly
                          to a vi/vim executable:

                          | % file /path/to/vim
                          | % file /path/to/vi

                          If this is the case, you should see something like this:

                          | /usr/bin/vim: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

                          If not, you are pointing to a soft link to another file, that may also
                          be a soft link.. etc.

                          | % file /usr/bin/vi
                          | /usr/bin/vi: symbolic link to `/etc/alternatives/vi'

                          In such circumstances, you can determine the ‘final’ target of your
                          commands via the ‘readlink command’.

                          To illustrate, here's what it looks like on my system:

                          | % type vi
                          | vi is /usr/bin/vi
                          |
                          | % readlink -f /usr/bin/vi
                          | /usr/bin/vim.gtk


                          | % type vim
                          | vi is /usr/bin/vim
                          |
                          | % readlink -f /usr/bin/vim
                          | /usr/bin/vim.gtk

                          Thanks,

                          CJ

                          --
                          WHAT YOU SAY??

                          --
                          You received this message from the "vim_use" maillist.
                          Do not top-post! Type your reply below the text you are replying to.
                          For more information, visit http://www.vim.org/maillist.php
                        • joe M
                          ... Hello CJ, Thanks for responding. On my system, I am building vi and vim differently. In my case, I think vi is not using the systems terminfo whereas vim
                          Message 12 of 16 , Aug 31 6:14 AM
                          • 0 Attachment
                            On Fri, Aug 31, 2012 at 1:27 AM, Chris Jones <cjns1989@...> wrote:
                            > On Thu, Aug 30, 2012 at 01:34:10PM EDT, joe M wrote:
                            >
                            > [..]
                            >
                            >> Anyway, just a heads-up if anyone is interested.
                            >
                            > I certainly do. Thanks for bringing this to the list's attention.
                            >
                            > Reading through the thread, I'm pretty sure you stated somewhere along
                            > the line that the behavior you reported occurs when you run ‘vim’ and
                            > does not occur when you run ‘vi’.
                            >
                            > On my (debian) system, vi and vim both point to the same executable.
                            >
                            > And here at least, whatever the terminal, both behave the same way in
                            > this respect, namely that the screen before I invoke vi/vim is not
                            > restored to its initial state -- that's the way I have set it up to suit
                            > my requirements.
                            >
                            > I find it a little suspicious that the same executable should behave
                            > differently regarding something that is not clearly related to editing
                            > itself and differences between vi and vim dure to their different
                            > capabilities just because you invoke the program in two different ways.
                            >
                            > Mind you, there may be a good reason for that, and I am just not aware
                            > of it.
                            >
                            > All the same, assuming you are running your tests on the same system,
                            > something you may want to check is the full path of the vi and the vim
                            > executable. So that we know precisely what gets executed.
                            >
                            > This should provide the full path:
                            >
                            > | % type vim
                            > | vim is /usr/bin/vim
                            > | % type vi
                            > | vi is /usr/bin/vi
                            >
                            > You could then use the file command to determine if they point directly
                            > to a vi/vim executable:
                            >
                            > | % file /path/to/vim
                            > | % file /path/to/vi
                            >
                            > If this is the case, you should see something like this:
                            >
                            > | /usr/bin/vim: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
                            >
                            > If not, you are pointing to a soft link to another file, that may also
                            > be a soft link.. etc.
                            >
                            > | % file /usr/bin/vi
                            > | /usr/bin/vi: symbolic link to `/etc/alternatives/vi'
                            >
                            > In such circumstances, you can determine the ‘final’ target of your
                            > commands via the ‘readlink command’.
                            >
                            > To illustrate, here's what it looks like on my system:
                            >
                            > | % type vi
                            > | vi is /usr/bin/vi
                            > |
                            > | % readlink -f /usr/bin/vi
                            > | /usr/bin/vim.gtk
                            >
                            >
                            > | % type vim
                            > | vi is /usr/bin/vim
                            > |
                            > | % readlink -f /usr/bin/vim
                            > | /usr/bin/vim.gtk
                            >
                            > Thanks,
                            >
                            > CJ
                            >
                            > --
                            > WHAT YOU SAY??
                            >
                            > --
                            > You received this message from the "vim_use" maillist.
                            > Do not top-post! Type your reply below the text you are replying to.
                            > For more information, visit http://www.vim.org/maillist.php

                            Hello CJ,

                            Thanks for responding.

                            On my system, I am building vi and vim differently. In my case, I
                            think vi is not using the systems' terminfo whereas vim does. Anyway,
                            I think there is something in rxvt-unicode-256color's terminfo that
                            affects how the latest vim from the mercurial repo responds/behaves.

                            Below is my build script for vi and vim

                            sed -i \
                            -e 's,/\* #define FEAT_XTERM_SAVE \*/,#define FEAT_XTERM_SAVE,g'\
                            src/feature.h
                            echo "CFLAGS: $CFLAGS"
                            echo "CXXFLAGS: $CXXFLAGS"
                            echo "LDFLAGS: $LDFLAGS"

                            ./configure --prefix=/usr \
                            --mandir=/usr/man \
                            --with-vim-name=vim \
                            --with-features=huge \
                            --with-x=yes \
                            --disable-gui \
                            --enable-multibyte \
                            --enable-luainterp \
                            --enable-perlinterp \
                            --enable-pythoninterp \
                            --enable-python3interp=dynamic \
                            --enable-tclinterp \
                            --enable-rubyinterp \
                            --enable-cscope \
                            --disable-acl \
                            --disable-sysmouse \
                            --disable-nls \
                            --disable-darwin \
                            --disable-largefile \
                            --disable-gpm \
                            --enable-xim \
                            --enable-fontset \
                            --enable-xsmp_interact


                            make VIMRTDIR=
                            cd src && \
                            make VIMRTDIR= DESTDIR=$PKG \
                            installvimbin installruntime installlinks \
                            && cd ..

                            mv $PKG/usr/share/vim/vimrc_example.vim $PKG/usr/share/vim/vimrc
                            rm -r $PKG/usr/{man/man?/vimtutor*,share/vim/{tutor,macros}}
                            rm $PKG/usr/share/vim/*/README.txt
                            ln -sf vim $PKG/usr/bin/evim
                            ln -sf /bin/vi $PKG/usr/bin/vi
                            ln -sf vim.1.gz $PKG/usr/man/man1/ex.1.gz
                            ln -sf vim.1.gz $PKG/usr/man/man1/vi.1.gz
                            ln -sf vim.1.gz $PKG/usr/man/man1/rvim.1.gz
                            ln -sf vim.1.gz $PKG/usr/man/man1/view.1.gz
                            ln -sf vim.1.gz $PKG/usr/man/man1/rview.1.gz
                            ln -sf vim.1.gz $PKG/usr/man/man1/gvim.1.gz

                            ./configure --prefix=/ \
                            --datarootdir=/usr/share \
                            --with-vim-name=vi \
                            --without-x \
                            --disable-gui \
                            --enable-multibyte \
                            --disable-gpm \
                            --disable-nls \
                            --with-features=tiny

                            make VIMRTDIR=
                            cd src/ && make VIMRTDIR= DESTDIR=$PKG installvimbin && cd ..

                            ./configure --prefix=/usr \
                            --with-vim-name=gvim \
                            --with-x \
                            --with-features=huge \
                            --enable-gui=gtk2 \
                            --enable-multibyte \
                            --enable-luainterp \
                            --enable-perlinterp \
                            --enable-pythoninterp \
                            --enable-python3interp=dynamic \
                            --enable-tclinterp \
                            --enable-rubyinterp \
                            --enable-cscope \
                            --enable-gpm \
                            --enable-xim \
                            --enable-fontset \
                            --enable-xsmp_interact \
                            --disable-darwin \
                            --disable-largefile \
                            --disable-acl \
                            --disable-sysmouse \
                            --disable-nls

                            make VIMRTDIR=
                            cd src && make VIMRTDIR= DESTDIR=$PKG installvimbin && cd ..

                            install -d $PKG/usr/share/{applications,pixmaps}

                            my vi and vim executables:

                            --(/bin)
                            ls -altr vi
                            -rwxr-xr-x 1 root root 743704 Aug 30 13:44 vi
                            --(/bin)
                            ls -altr /usr/bin/vim
                            -rwxr-xr-x 1 root root 2228360 Aug 30 13:44 /usr/bin/vim
                            --(/bin)
                            /bin/vi --version
                            VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 30 2012 13:44:25)
                            Included patches: 1-646
                            Compiled by root@master
                            Tiny version without GUI. Features included (+) or not (-):
                            -arabic -autocmd -balloon_eval -browse +builtin_terms -byte_offset -cindent
                            -clientserver -clipboard -cmdline_compl -cmdline_hist -cmdline_info -comments
                            -conceal -cryptv -cscope -cursorbind -cursorshape -dialog -diff -digraphs -dnd
                            -ebcdic -emacs_tags -eval -ex_extra -extra_search -farsi -file_in_path
                            -find_in_path -float -folding -footer +fork() -gettext -hangul_input +iconv
                            -insert_expand -jumplist -keymap -langmap -libcall -linebreak -lispindent
                            -listcmds -localmap -lua -menu -mksession -modify_fname -mouse -mouse_dec
                            -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse -mouse_xterm
                            -mouse_urxvt -mouse_sgr +multi_byte -multi_lang -mzscheme -netbeans_intg
                            -path_extra -perl -persistent_undo -printer -profile -python -python3 -quickfix
                            -reltime -rightleft -ruby -scrollbind -signs -smartindent -sniff -startuptime
                            -statusline -sun_workshop -syntax -tag_binary -tag_old_static -tag_any_white
                            -tcl +terminfo -termresponse -textobjects -title -toolbar -user_commands
                            -vertsplit -virtualedit -visual -viminfo -vreplace +wildignore -wildmenu
                            -windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard +xterm_save
                            system vimrc file: "$VIM/vimrc"
                            user vimrc file: "$HOME/.vimrc"
                            user exrc file: "$HOME/.exrc"
                            fall-back for $VIM: "/usr/share/vim"
                            Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -pipe -ftracer
                            -fgcse-after-reload -march=core2 -mcx16 -msahf -mpclmul -mpopcnt
                            -msse4.2 --param l1-cache-size=32 --param l1-cache-line-size=64
                            --param l2-cache-size=3072 -mtune=generic -U_FORTIFY_SOURCE
                            -D_FORTIFY_SOURCE=1
                            Linking: gcc -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
                            -Wl,--as-needed -o vi -lm -lncurses -lelf -lnsl -lacl -lattr
                            -ldl
                            --(/bin)
                            /usr/bin/vim --version
                            VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 30 2012 13:44:16)
                            Included patches: 1-646
                            Compiled by root@master
                            Huge version without GUI. Features included (+) or not (-):
                            +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
                            +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
                            +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
                            -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
                            +find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv
                            +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent
                            +listcmds +localmap +lua +menu +mksession +modify_fname +mouse -mouseshape
                            +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse
                            +mouse_xterm +mouse_urxvt +mouse_sgr +multi_byte +multi_lang -mzscheme
                            +netbeans_intg +path_extra +perl +persistent_undo +postscript +printer +profile
                            +python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs
                            +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
                            +tag_old_static -tag_any_white +tcl +terminfo +termresponse +textobjects +title
                            -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
                            +vreplace +wildignore +wildmenu +windows +writebackup +X11 +xfontset -xim
                            +xsmp_interact +xterm_clipboard +xterm_save
                            system vimrc file: "$VIM/vimrc"
                            user vimrc file: "$HOME/.vimrc"
                            user exrc file: "$HOME/.exrc"
                            fall-back for $VIM: "/usr/share/vim"
                            Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -pipe -ftracer
                            -fgcse-after-reload -march=core2 -mcx16 -msahf -mpclmul -mpopcnt
                            -msse4.2 --param l1-cache-size=32 --param l1-cache-line-size=64
                            --param l2-cache-size=3072 -mtune=generic -U_FORTIFY_SOURCE
                            -D_FORTIFY_SOURCE=1 -I/usr/include -D_LARGEFILE64_SOURCE=1
                            Linking: gcc -L. -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common
                            -rdynamic -Wl,-export-dynamic -Wl,-E
                            -Wl,-rpath,/usr/lib/perl5/5.12/linux-thread-multi/CORE -Wl,-O1
                            -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--as-needed -o vim -lSM
                            -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -lncurses -lelf -lnsl
                            -ldl -L/usr/lib -llua -Wl,-E
                            -Wl,-rpath,/usr/lib/perl5/5.12/linux-thread-multi/CORE
                            -fstack-protector -L/usr/lib/perl5/5.12/linux-thread-multi/CORE
                            -lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
                            -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm
                            -Xlinker -export-dynamic -L/usr/lib -ltcl8.5 -ldl -lieee -lm -Wl,-R
                            -Wl,/usr/lib -L/usr/lib -lruby -lpthread -lrt -ldl -lcrypt -lm
                            -L/usr/lib
                            --(/bin)

                            Hope the above helps. Please let me know if you need more information.

                            Thanks,
                            Joe

                            --
                            You received this message from the "vim_use" maillist.
                            Do not top-post! Type your reply below the text you are replying to.
                            For more information, visit http://www.vim.org/maillist.php
                          • Chris Jones
                            ... [..] ... I m not an expert in Vim or termcap/terminfo by a long way... :-) I m still not sure you are actually executing the code you compiled, but I ll
                            Message 13 of 16 , Aug 31 8:47 PM
                            • 0 Attachment
                              On Fri, Aug 31, 2012 at 09:14:14AM EDT, joe M wrote:
                              > On Fri, Aug 31, 2012 at 1:27 AM, Chris Jones <cjns1989@...> wrote:
                              > > On Thu, Aug 30, 2012 at 01:34:10PM EDT, joe M wrote:

                              [..]

                              > Hope the above helps. Please let me know if you need more information.

                              I'm not an expert in Vim or termcap/terminfo by a long way... :-)

                              I'm still not sure you are actually executing the code you compiled, but
                              I'll trust you on that. If you are confident the executables in /bin and
                              /usr/bin are the ones you compiled yourself, I nevertheless suggest you
                              run all your tests invoking them via their full path (/usr/bin/vim and
                              /bin/vi).

                              I also thought that a possible explanation of the inconsistent behavior
                              might be caused by the fact that ‘vi’ was using termcap and ‘vim’ was
                              using terminfo.. and that there might be escape sequence discrepancies
                              between the two on your system --something that I believe should not
                              happen, since a given terminal's capabilities remain the same and its
                              termcap and terminfo escape sequences should therefore be identical.

                              Another thing: _my understanding_ is that when both terminfo and termcap
                              are implemented, Vim chooses terminfo ‘automatically’ at configure time.
                              cf. :help startup-terminal.

                              And then there is the fact that I see ‘+terminfo’ in the output of both
                              the ‘vi --version’ and the ‘vim --version’ that you pasted in your
                              previous post. (cf. :h +terminfo).

                              Besides, ‘man 5 termcap’ has the following: ‘The termcap database is an
                              obsolete facility for describing the capabilities of character-cell
                              termi‐ nals and printers. It is retained only for capability with old
                              programs; new ones should use the ter‐ minfo(5) database and associated
                              libraries.’

                              Don't see any good reason Vim would use an ‘obsolete facility’ unless it
                              had to.

                              In no particular order, a few additional questions/remarks that might
                              help clarify:

                              1. What distribution are you running?

                              2. Did you run the default version of vi/vim before you compiled your
                              own from source?

                              3. If so, are you positive you removed the prior version?

                              4. Not suggesting a workaround, but did you try running the same test on
                              a different terminal.. & see what happens..? xterm is probably already
                              installed on your system¹, if not, you could also try good ole rxvt?

                              5. Conversely, how about temporarily removing your compiled version and
                              installing your distro's default version and running a test. If the
                              problem goes away, this might suggest that the different behavior is
                              caused by one of the --enable-option that you specify at ./configure
                              time..?

                              6. Would it make sense to generate both executables using the same
                              ./configure options.. check whether you still have the problem?

                              7. Just in case, is there a TERMCAP environment variable exported to
                              your terminal session before you run vi/vim:

                              % env | grep TERMCAP

                              8. As to builtin terminals.. I'm still running vim 7.2 and when I do
                              a ‘:set term=xxx’ there is no mention of urxvt or rxvt in my list of
                              builtin terminals. Is this also what happens with vim 7.3?

                              9. Is termcap implemented on your system? On debian I apparently have it
                              as part of the libncurses5-dev package.

                              Naturally, the above are not really meant as questions, but rather,
                              stuff I would ask myself if I had the same problem and that might help
                              investigate².

                              CJ

                              ¹ Note that in the case of xterm, you can {en/dis}able the alternate
                              screen capability by holding down the CTRL key and middle-clicking:
                              This brings up a menu where you can check/uncheck ‘Enable alternate
                              screen switching’.

                              ² As to the disappearing lines, (the ‘seq 1000’ test), when I disable
                              alternate screen switching, I find that roughly one screen worth of
                              numbers are overwritten by the Vim screen that remains visible after
                              I exit. I have something like 91 lines on my terminal and when
                              I scroll back, the last number I see is 909.. immediately followed by
                              the last visible contents of the Vim session --i.e. if I was looking
                              at an empty buffer, I see a bash prompt, then vim's tabline, followed
                              by a number of empty lines and then the status line and lastly my bash
                              prompt at the bottom of the screen. I would imagine this is expected
                              behavior (?).

                              --

                              WHAT YOU SAY??

                              --
                              You received this message from the "vim_use" maillist.
                              Do not top-post! Type your reply below the text you are replying to.
                              For more information, visit http://www.vim.org/maillist.php
                            • joe M
                              ... Hello CJ, Thanks for the detailed response. I will go through the email and keep you posted if I notice anything different. Again, Thanks a lot for such a
                              Message 14 of 16 , Sep 1, 2012
                              • 0 Attachment
                                On Fri, Aug 31, 2012 at 11:47 PM, Chris Jones <cjns1989@...> wrote:
                                > On Fri, Aug 31, 2012 at 09:14:14AM EDT, joe M wrote:
                                >> On Fri, Aug 31, 2012 at 1:27 AM, Chris Jones <cjns1989@...> wrote:
                                >> > On Thu, Aug 30, 2012 at 01:34:10PM EDT, joe M wrote:
                                >
                                > [..]
                                >
                                >> Hope the above helps. Please let me know if you need more information.
                                >
                                > I'm not an expert in Vim or termcap/terminfo by a long way... :-)
                                >
                                > I'm still not sure you are actually executing the code you compiled, but
                                > I'll trust you on that. If you are confident the executables in /bin and
                                > /usr/bin are the ones you compiled yourself, I nevertheless suggest you
                                > run all your tests invoking them via their full path (/usr/bin/vim and
                                > /bin/vi).
                                >
                                > I also thought that a possible explanation of the inconsistent behavior
                                > might be caused by the fact that ‘vi’ was using termcap and ‘vim’ was
                                > using terminfo.. and that there might be escape sequence discrepancies
                                > between the two on your system --something that I believe should not
                                > happen, since a given terminal's capabilities remain the same and its
                                > termcap and terminfo escape sequences should therefore be identical.
                                >
                                > Another thing: _my understanding_ is that when both terminfo and termcap
                                > are implemented, Vim chooses terminfo ‘automatically’ at configure time.
                                > cf. :help startup-terminal.
                                >
                                > And then there is the fact that I see ‘+terminfo’ in the output of both
                                > the ‘vi --version’ and the ‘vim --version’ that you pasted in your
                                > previous post. (cf. :h +terminfo).
                                >
                                > Besides, ‘man 5 termcap’ has the following: ‘The termcap database is an
                                > obsolete facility for describing the capabilities of character-cell
                                > termi‐ nals and printers. It is retained only for capability with old
                                > programs; new ones should use the ter‐ minfo(5) database and associated
                                > libraries.’
                                >
                                > Don't see any good reason Vim would use an ‘obsolete facility’ unless it
                                > had to.
                                >
                                > In no particular order, a few additional questions/remarks that might
                                > help clarify:
                                >
                                > 1. What distribution are you running?
                                >
                                > 2. Did you run the default version of vi/vim before you compiled your
                                > own from source?
                                >
                                > 3. If so, are you positive you removed the prior version?
                                >
                                > 4. Not suggesting a workaround, but did you try running the same test on
                                > a different terminal.. & see what happens..? xterm is probably already
                                > installed on your system¹, if not, you could also try good ole rxvt?
                                >
                                > 5. Conversely, how about temporarily removing your compiled version and
                                > installing your distro's default version and running a test. If the
                                > problem goes away, this might suggest that the different behavior is
                                > caused by one of the --enable-option that you specify at ./configure
                                > time..?
                                >
                                > 6. Would it make sense to generate both executables using the same
                                > ./configure options.. check whether you still have the problem?
                                >
                                > 7. Just in case, is there a TERMCAP environment variable exported to
                                > your terminal session before you run vi/vim:
                                >
                                > % env | grep TERMCAP
                                >
                                > 8. As to builtin terminals.. I'm still running vim 7.2 and when I do
                                > a ‘:set term=xxx’ there is no mention of urxvt or rxvt in my list of
                                > builtin terminals. Is this also what happens with vim 7.3?
                                >
                                > 9. Is termcap implemented on your system? On debian I apparently have it
                                > as part of the libncurses5-dev package.
                                >
                                > Naturally, the above are not really meant as questions, but rather,
                                > stuff I would ask myself if I had the same problem and that might help
                                > investigate².
                                >
                                > CJ
                                >
                                > ¹ Note that in the case of xterm, you can {en/dis}able the alternate
                                > screen capability by holding down the CTRL key and middle-clicking:
                                > This brings up a menu where you can check/uncheck ‘Enable alternate
                                > screen switching’.
                                >
                                > ² As to the disappearing lines, (the ‘seq 1000’ test), when I disable
                                > alternate screen switching, I find that roughly one screen worth of
                                > numbers are overwritten by the Vim screen that remains visible after
                                > I exit. I have something like 91 lines on my terminal and when
                                > I scroll back, the last number I see is 909.. immediately followed by
                                > the last visible contents of the Vim session --i.e. if I was looking
                                > at an empty buffer, I see a bash prompt, then vim's tabline, followed
                                > by a number of empty lines and then the status line and lastly my bash
                                > prompt at the bottom of the screen. I would imagine this is expected
                                > behavior (?).
                                >
                                > --
                                >
                                > WHAT YOU SAY??
                                >
                                > --
                                > You received this message from the "vim_use" maillist.
                                > Do not top-post! Type your reply below the text you are replying to.
                                > For more information, visit http://www.vim.org/maillist.php

                                Hello CJ,

                                Thanks for the detailed response. I will go through the email and keep
                                you posted if I notice anything different.

                                Again, Thanks a lot for such a detailed response,
                                Joe

                                --
                                You received this message from the "vim_use" maillist.
                                Do not top-post! Type your reply below the text you are replying to.
                                For more information, visit http://www.vim.org/maillist.php
                              • Chris Jones
                                On Sat, Sep 01, 2012 at 11:19:23AM EDT, joe M wrote: [..] ... Not much help probably.. :-) Might be interesting testing your version of Vim/vi on an xterm,
                                Message 15 of 16 , Sep 1, 2012
                                • 0 Attachment
                                  On Sat, Sep 01, 2012 at 11:19:23AM EDT, joe M wrote:

                                  [..]

                                  > Thanks for the detailed response. I will go through the email and keep
                                  > you posted if I notice anything different.

                                  Not much help probably.. :-)

                                  Might be interesting testing your version of Vim/vi on an xterm,
                                  though..

                                  CJ

                                  --
                                  Have a nice day!

                                  --
                                  You received this message from the "vim_use" maillist.
                                  Do not top-post! Type your reply below the text you are replying to.
                                  For more information, visit http://www.vim.org/maillist.php
                                • joe M
                                  ... Just as a fyi, the below lines in my vimrc were causing the issue: call tcomment#DefineType( idris , -- %s ) call
                                  Message 16 of 16 , Jan 19, 2013
                                  • 0 Attachment
                                    On Sat, Sep 1, 2012 at 12:10 PM, Chris Jones <cjns1989@...> wrote:
                                    > On Sat, Sep 01, 2012 at 11:19:23AM EDT, joe M wrote:
                                    >
                                    > [..]
                                    >
                                    >> Thanks for the detailed response. I will go through the email and keep
                                    >> you posted if I notice anything different.
                                    >
                                    > Not much help probably.. :-)
                                    >
                                    > Might be interesting testing your version of Vim/vi on an xterm,
                                    > though..
                                    >
                                    > CJ
                                    >
                                    > --
                                    > Have a nice day!
                                    >
                                    > --
                                    > You received this message from the "vim_use" maillist.
                                    > Do not top-post! Type your reply below the text you are replying to.
                                    > For more information, visit http://www.vim.org/maillist.php


                                    Just as a fyi, the below lines in my vimrc were causing the issue:

                                    call tcomment#DefineType('idris', '-- %s' )
                                    call tcomment#DefineType('idris_block', "{-%s-}\n " )
                                    call tcomment#DefineType('idris_inline', '{- %s -}' )

                                    Thanks
                                    Joe

                                    --
                                    You received this message from the "vim_use" maillist.
                                    Do not top-post! Type your reply below the text you are replying to.
                                    For more information, visit http://www.vim.org/maillist.php
                                  Your message has been successfully submitted and would be delivered to recipients shortly.