How to set the bash display to not show the vim text after exit?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
23
down vote

favorite
5












My question is simple, but I am finding it hard to frame/explain it easily.



I log into several Unix boxes with different accounts. I see 2 different things for user1 and user2, while editing text files in vim



user1



When I type vim filename, vim opens and I edit the file. When I close it, the complete text from the file is gone , and I see the Teminals' command/output that was previously present.



user2



When I type vim filename, vim opens and I edit the file. When I close it, the part of file that was present on the display while I was in vim still shows up at the display, and all the previous Terminal display get's scrolled up. Even if the file was just 1 line, after exiting vim, the display shows the first line, with rest all the ~ and I see the command prompt at the bottom of screen.



Details



$ bash --version
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
$ vim --version
VIM - Vi IMproved 7.0 (2006 May 7, compiled Jun 12 2009 07:08:36)


I compared the vimrc files for both users, and I am aware of all the settings, and don't find any setting/config related to this behavior.



Is this behavior related to shell config ? How do I set the things, so that I get the behavior as shown in user1 scenario?



I am not able to describe this easily, also finding it hard to google, as I don't to know what keyword to look for such behavior. Let me know, If I should elaborate further.










share|improve this question























  • Are user1 and user2 accounts on the same or different machines?
    – jasonwryan
    Jan 7 '13 at 8:03










  • @jasonwryan Logging on same machine too shows same scenario. @ warl0ck Thanks for that.
    – mtk
    Jan 7 '13 at 8:19







  • 1




    If you wanted to force this behaviour but retain your terminal type, add a line to your .bashrc or .profile saying alias vi ="/usr/bin/vi $* ; clear"
    – Criggie
    Nov 10 '16 at 6:27














up vote
23
down vote

favorite
5












My question is simple, but I am finding it hard to frame/explain it easily.



I log into several Unix boxes with different accounts. I see 2 different things for user1 and user2, while editing text files in vim



user1



When I type vim filename, vim opens and I edit the file. When I close it, the complete text from the file is gone , and I see the Teminals' command/output that was previously present.



user2



When I type vim filename, vim opens and I edit the file. When I close it, the part of file that was present on the display while I was in vim still shows up at the display, and all the previous Terminal display get's scrolled up. Even if the file was just 1 line, after exiting vim, the display shows the first line, with rest all the ~ and I see the command prompt at the bottom of screen.



Details



$ bash --version
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
$ vim --version
VIM - Vi IMproved 7.0 (2006 May 7, compiled Jun 12 2009 07:08:36)


I compared the vimrc files for both users, and I am aware of all the settings, and don't find any setting/config related to this behavior.



Is this behavior related to shell config ? How do I set the things, so that I get the behavior as shown in user1 scenario?



I am not able to describe this easily, also finding it hard to google, as I don't to know what keyword to look for such behavior. Let me know, If I should elaborate further.










share|improve this question























  • Are user1 and user2 accounts on the same or different machines?
    – jasonwryan
    Jan 7 '13 at 8:03










  • @jasonwryan Logging on same machine too shows same scenario. @ warl0ck Thanks for that.
    – mtk
    Jan 7 '13 at 8:19







  • 1




    If you wanted to force this behaviour but retain your terminal type, add a line to your .bashrc or .profile saying alias vi ="/usr/bin/vi $* ; clear"
    – Criggie
    Nov 10 '16 at 6:27












up vote
23
down vote

favorite
5









up vote
23
down vote

favorite
5






5





My question is simple, but I am finding it hard to frame/explain it easily.



I log into several Unix boxes with different accounts. I see 2 different things for user1 and user2, while editing text files in vim



user1



When I type vim filename, vim opens and I edit the file. When I close it, the complete text from the file is gone , and I see the Teminals' command/output that was previously present.



user2



When I type vim filename, vim opens and I edit the file. When I close it, the part of file that was present on the display while I was in vim still shows up at the display, and all the previous Terminal display get's scrolled up. Even if the file was just 1 line, after exiting vim, the display shows the first line, with rest all the ~ and I see the command prompt at the bottom of screen.



Details



$ bash --version
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
$ vim --version
VIM - Vi IMproved 7.0 (2006 May 7, compiled Jun 12 2009 07:08:36)


I compared the vimrc files for both users, and I am aware of all the settings, and don't find any setting/config related to this behavior.



Is this behavior related to shell config ? How do I set the things, so that I get the behavior as shown in user1 scenario?



I am not able to describe this easily, also finding it hard to google, as I don't to know what keyword to look for such behavior. Let me know, If I should elaborate further.










share|improve this question















My question is simple, but I am finding it hard to frame/explain it easily.



I log into several Unix boxes with different accounts. I see 2 different things for user1 and user2, while editing text files in vim



user1



When I type vim filename, vim opens and I edit the file. When I close it, the complete text from the file is gone , and I see the Teminals' command/output that was previously present.



user2



When I type vim filename, vim opens and I edit the file. When I close it, the part of file that was present on the display while I was in vim still shows up at the display, and all the previous Terminal display get's scrolled up. Even if the file was just 1 line, after exiting vim, the display shows the first line, with rest all the ~ and I see the command prompt at the bottom of screen.



Details



$ bash --version
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
$ vim --version
VIM - Vi IMproved 7.0 (2006 May 7, compiled Jun 12 2009 07:08:36)


I compared the vimrc files for both users, and I am aware of all the settings, and don't find any setting/config related to this behavior.



Is this behavior related to shell config ? How do I set the things, so that I get the behavior as shown in user1 scenario?



I am not able to describe this easily, also finding it hard to google, as I don't to know what keyword to look for such behavior. Let me know, If I should elaborate further.







terminal vim display






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 7 '13 at 8:27

























asked Jan 7 '13 at 7:43









mtk

7,5702559102




7,5702559102











  • Are user1 and user2 accounts on the same or different machines?
    – jasonwryan
    Jan 7 '13 at 8:03










  • @jasonwryan Logging on same machine too shows same scenario. @ warl0ck Thanks for that.
    – mtk
    Jan 7 '13 at 8:19







  • 1




    If you wanted to force this behaviour but retain your terminal type, add a line to your .bashrc or .profile saying alias vi ="/usr/bin/vi $* ; clear"
    – Criggie
    Nov 10 '16 at 6:27
















  • Are user1 and user2 accounts on the same or different machines?
    – jasonwryan
    Jan 7 '13 at 8:03










  • @jasonwryan Logging on same machine too shows same scenario. @ warl0ck Thanks for that.
    – mtk
    Jan 7 '13 at 8:19







  • 1




    If you wanted to force this behaviour but retain your terminal type, add a line to your .bashrc or .profile saying alias vi ="/usr/bin/vi $* ; clear"
    – Criggie
    Nov 10 '16 at 6:27















Are user1 and user2 accounts on the same or different machines?
– jasonwryan
Jan 7 '13 at 8:03




Are user1 and user2 accounts on the same or different machines?
– jasonwryan
Jan 7 '13 at 8:03












@jasonwryan Logging on same machine too shows same scenario. @ warl0ck Thanks for that.
– mtk
Jan 7 '13 at 8:19





@jasonwryan Logging on same machine too shows same scenario. @ warl0ck Thanks for that.
– mtk
Jan 7 '13 at 8:19





1




1




If you wanted to force this behaviour but retain your terminal type, add a line to your .bashrc or .profile saying alias vi ="/usr/bin/vi $* ; clear"
– Criggie
Nov 10 '16 at 6:27




If you wanted to force this behaviour but retain your terminal type, add a line to your .bashrc or .profile saying alias vi ="/usr/bin/vi $* ; clear"
– Criggie
Nov 10 '16 at 6:27










3 Answers
3






active

oldest

votes

















up vote
20
down vote



accepted










One of the reasons for that behaviour will be the setting of the terminal for each user.



For example:



  • User1 is using TERM=xterm, in this case when you exit vim it will clear the terminal.

  • User2 is using TERM=vt100, in this case when you exit vim it will not clear the terminal.

Check what terminal user1 is using with echo $TERM and set the same for user2.
for bash:




TERM=xterm; export TERM







share|improve this answer






















  • +1 Exact/perfect solution. Thanks !!! Didn't thought it was that easy. Can you please elaborate on what a TERM is? or point to some resource link? I need to understand this. Does this affect only when we connect via putty?
    – mtk
    Jan 7 '13 at 8:31










  • You can specify the terminal setting into the putty session, but users can have it specify on their environment variables. TERM will define your terminal type and also some will have more features that other, example, xterm supports colors and it will update the rows and columns automatically. If you use vt100, it will default to 24 rows by 80 columns when you resize your terminal you will see that it sticks to 24x80. Check this unix.stackexchange.com/questions/43945/…, it might explain better than me.
    – BitsOfNix
    Jan 7 '13 at 9:01










  • It's the terminal behaviour, not the shell. The terminal emulator settings are the same whatever tool you use to connect. The difference is explained in details here: unix.stackexchange.com/questions/4126/…
    – Leonid
    Jan 7 '13 at 9:01










  • @Leonid, not exactly, if you use putty you can define and it will update when connecting if the user does not a TERM define. If the user has it defined then you are right, not matter what tool it will prevail the setting on the user environment.
    – BitsOfNix
    Jan 7 '13 at 9:04










  • Just a note about this solution: YMMV. It's not always "xterm". Using dwm (Dynamic Window Manager) with dmenu on FreeBSD 10 I had to fake the terminal by using "rxvt" to get scenario 1. You can also skip the term setting by adding "set term=rxvt" to your ~/.vimrc file.
    – Ryder
    Mar 4 '15 at 10:12

















up vote
13
down vote













Such behavior was the only thing that kept me away from using screen. It uses "screen" terminal and changing it to "xterm" didn't help.



Adding altscreen on option in ~/.screenrc solved it. From screen's manual:



altscreen on|off

If set to on, "alternate screen" support is enabled in virtual terminals, just like in xterm. Initial setting is `off'.





share|improve this answer




















  • @Fox OP doesn't mention anything about TERM he is using, so this can be just alternative answer. Anyway this page is on very top while googling for screen issue too.
    – BartBiczBoży
    Nov 10 '16 at 7:16






  • 1




    This did the trick! Keywords: "vim quit leaves visual artifacts terminal"
    – Jay Taylor
    Dec 21 '17 at 17:53

















up vote
0
down vote













I have tried all these options but the result was not the one that I expected. !clear would clear the entire screen and does not leave behind the earlier bash commands.



Simple and correct solution is to set the terminal type string to xterm and terminal speeds to 38400,38400 under Terminal details in putty settings under Connection->Data.



Save the settings and you are good to go.






share|improve this answer






















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f60499%2fhow-to-set-the-bash-display-to-not-show-the-vim-text-after-exit%23new-answer', 'question_page');

    );

    Post as a guest






























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    20
    down vote



    accepted










    One of the reasons for that behaviour will be the setting of the terminal for each user.



    For example:



    • User1 is using TERM=xterm, in this case when you exit vim it will clear the terminal.

    • User2 is using TERM=vt100, in this case when you exit vim it will not clear the terminal.

    Check what terminal user1 is using with echo $TERM and set the same for user2.
    for bash:




    TERM=xterm; export TERM







    share|improve this answer






















    • +1 Exact/perfect solution. Thanks !!! Didn't thought it was that easy. Can you please elaborate on what a TERM is? or point to some resource link? I need to understand this. Does this affect only when we connect via putty?
      – mtk
      Jan 7 '13 at 8:31










    • You can specify the terminal setting into the putty session, but users can have it specify on their environment variables. TERM will define your terminal type and also some will have more features that other, example, xterm supports colors and it will update the rows and columns automatically. If you use vt100, it will default to 24 rows by 80 columns when you resize your terminal you will see that it sticks to 24x80. Check this unix.stackexchange.com/questions/43945/…, it might explain better than me.
      – BitsOfNix
      Jan 7 '13 at 9:01










    • It's the terminal behaviour, not the shell. The terminal emulator settings are the same whatever tool you use to connect. The difference is explained in details here: unix.stackexchange.com/questions/4126/…
      – Leonid
      Jan 7 '13 at 9:01










    • @Leonid, not exactly, if you use putty you can define and it will update when connecting if the user does not a TERM define. If the user has it defined then you are right, not matter what tool it will prevail the setting on the user environment.
      – BitsOfNix
      Jan 7 '13 at 9:04










    • Just a note about this solution: YMMV. It's not always "xterm". Using dwm (Dynamic Window Manager) with dmenu on FreeBSD 10 I had to fake the terminal by using "rxvt" to get scenario 1. You can also skip the term setting by adding "set term=rxvt" to your ~/.vimrc file.
      – Ryder
      Mar 4 '15 at 10:12














    up vote
    20
    down vote



    accepted










    One of the reasons for that behaviour will be the setting of the terminal for each user.



    For example:



    • User1 is using TERM=xterm, in this case when you exit vim it will clear the terminal.

    • User2 is using TERM=vt100, in this case when you exit vim it will not clear the terminal.

    Check what terminal user1 is using with echo $TERM and set the same for user2.
    for bash:




    TERM=xterm; export TERM







    share|improve this answer






















    • +1 Exact/perfect solution. Thanks !!! Didn't thought it was that easy. Can you please elaborate on what a TERM is? or point to some resource link? I need to understand this. Does this affect only when we connect via putty?
      – mtk
      Jan 7 '13 at 8:31










    • You can specify the terminal setting into the putty session, but users can have it specify on their environment variables. TERM will define your terminal type and also some will have more features that other, example, xterm supports colors and it will update the rows and columns automatically. If you use vt100, it will default to 24 rows by 80 columns when you resize your terminal you will see that it sticks to 24x80. Check this unix.stackexchange.com/questions/43945/…, it might explain better than me.
      – BitsOfNix
      Jan 7 '13 at 9:01










    • It's the terminal behaviour, not the shell. The terminal emulator settings are the same whatever tool you use to connect. The difference is explained in details here: unix.stackexchange.com/questions/4126/…
      – Leonid
      Jan 7 '13 at 9:01










    • @Leonid, not exactly, if you use putty you can define and it will update when connecting if the user does not a TERM define. If the user has it defined then you are right, not matter what tool it will prevail the setting on the user environment.
      – BitsOfNix
      Jan 7 '13 at 9:04










    • Just a note about this solution: YMMV. It's not always "xterm". Using dwm (Dynamic Window Manager) with dmenu on FreeBSD 10 I had to fake the terminal by using "rxvt" to get scenario 1. You can also skip the term setting by adding "set term=rxvt" to your ~/.vimrc file.
      – Ryder
      Mar 4 '15 at 10:12












    up vote
    20
    down vote



    accepted







    up vote
    20
    down vote



    accepted






    One of the reasons for that behaviour will be the setting of the terminal for each user.



    For example:



    • User1 is using TERM=xterm, in this case when you exit vim it will clear the terminal.

    • User2 is using TERM=vt100, in this case when you exit vim it will not clear the terminal.

    Check what terminal user1 is using with echo $TERM and set the same for user2.
    for bash:




    TERM=xterm; export TERM







    share|improve this answer














    One of the reasons for that behaviour will be the setting of the terminal for each user.



    For example:



    • User1 is using TERM=xterm, in this case when you exit vim it will clear the terminal.

    • User2 is using TERM=vt100, in this case when you exit vim it will not clear the terminal.

    Check what terminal user1 is using with echo $TERM and set the same for user2.
    for bash:




    TERM=xterm; export TERM








    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jan 7 '13 at 8:58

























    answered Jan 7 '13 at 8:19









    BitsOfNix

    4,03121531




    4,03121531











    • +1 Exact/perfect solution. Thanks !!! Didn't thought it was that easy. Can you please elaborate on what a TERM is? or point to some resource link? I need to understand this. Does this affect only when we connect via putty?
      – mtk
      Jan 7 '13 at 8:31










    • You can specify the terminal setting into the putty session, but users can have it specify on their environment variables. TERM will define your terminal type and also some will have more features that other, example, xterm supports colors and it will update the rows and columns automatically. If you use vt100, it will default to 24 rows by 80 columns when you resize your terminal you will see that it sticks to 24x80. Check this unix.stackexchange.com/questions/43945/…, it might explain better than me.
      – BitsOfNix
      Jan 7 '13 at 9:01










    • It's the terminal behaviour, not the shell. The terminal emulator settings are the same whatever tool you use to connect. The difference is explained in details here: unix.stackexchange.com/questions/4126/…
      – Leonid
      Jan 7 '13 at 9:01










    • @Leonid, not exactly, if you use putty you can define and it will update when connecting if the user does not a TERM define. If the user has it defined then you are right, not matter what tool it will prevail the setting on the user environment.
      – BitsOfNix
      Jan 7 '13 at 9:04










    • Just a note about this solution: YMMV. It's not always "xterm". Using dwm (Dynamic Window Manager) with dmenu on FreeBSD 10 I had to fake the terminal by using "rxvt" to get scenario 1. You can also skip the term setting by adding "set term=rxvt" to your ~/.vimrc file.
      – Ryder
      Mar 4 '15 at 10:12
















    • +1 Exact/perfect solution. Thanks !!! Didn't thought it was that easy. Can you please elaborate on what a TERM is? or point to some resource link? I need to understand this. Does this affect only when we connect via putty?
      – mtk
      Jan 7 '13 at 8:31










    • You can specify the terminal setting into the putty session, but users can have it specify on their environment variables. TERM will define your terminal type and also some will have more features that other, example, xterm supports colors and it will update the rows and columns automatically. If you use vt100, it will default to 24 rows by 80 columns when you resize your terminal you will see that it sticks to 24x80. Check this unix.stackexchange.com/questions/43945/…, it might explain better than me.
      – BitsOfNix
      Jan 7 '13 at 9:01










    • It's the terminal behaviour, not the shell. The terminal emulator settings are the same whatever tool you use to connect. The difference is explained in details here: unix.stackexchange.com/questions/4126/…
      – Leonid
      Jan 7 '13 at 9:01










    • @Leonid, not exactly, if you use putty you can define and it will update when connecting if the user does not a TERM define. If the user has it defined then you are right, not matter what tool it will prevail the setting on the user environment.
      – BitsOfNix
      Jan 7 '13 at 9:04










    • Just a note about this solution: YMMV. It's not always "xterm". Using dwm (Dynamic Window Manager) with dmenu on FreeBSD 10 I had to fake the terminal by using "rxvt" to get scenario 1. You can also skip the term setting by adding "set term=rxvt" to your ~/.vimrc file.
      – Ryder
      Mar 4 '15 at 10:12















    +1 Exact/perfect solution. Thanks !!! Didn't thought it was that easy. Can you please elaborate on what a TERM is? or point to some resource link? I need to understand this. Does this affect only when we connect via putty?
    – mtk
    Jan 7 '13 at 8:31




    +1 Exact/perfect solution. Thanks !!! Didn't thought it was that easy. Can you please elaborate on what a TERM is? or point to some resource link? I need to understand this. Does this affect only when we connect via putty?
    – mtk
    Jan 7 '13 at 8:31












    You can specify the terminal setting into the putty session, but users can have it specify on their environment variables. TERM will define your terminal type and also some will have more features that other, example, xterm supports colors and it will update the rows and columns automatically. If you use vt100, it will default to 24 rows by 80 columns when you resize your terminal you will see that it sticks to 24x80. Check this unix.stackexchange.com/questions/43945/…, it might explain better than me.
    – BitsOfNix
    Jan 7 '13 at 9:01




    You can specify the terminal setting into the putty session, but users can have it specify on their environment variables. TERM will define your terminal type and also some will have more features that other, example, xterm supports colors and it will update the rows and columns automatically. If you use vt100, it will default to 24 rows by 80 columns when you resize your terminal you will see that it sticks to 24x80. Check this unix.stackexchange.com/questions/43945/…, it might explain better than me.
    – BitsOfNix
    Jan 7 '13 at 9:01












    It's the terminal behaviour, not the shell. The terminal emulator settings are the same whatever tool you use to connect. The difference is explained in details here: unix.stackexchange.com/questions/4126/…
    – Leonid
    Jan 7 '13 at 9:01




    It's the terminal behaviour, not the shell. The terminal emulator settings are the same whatever tool you use to connect. The difference is explained in details here: unix.stackexchange.com/questions/4126/…
    – Leonid
    Jan 7 '13 at 9:01












    @Leonid, not exactly, if you use putty you can define and it will update when connecting if the user does not a TERM define. If the user has it defined then you are right, not matter what tool it will prevail the setting on the user environment.
    – BitsOfNix
    Jan 7 '13 at 9:04




    @Leonid, not exactly, if you use putty you can define and it will update when connecting if the user does not a TERM define. If the user has it defined then you are right, not matter what tool it will prevail the setting on the user environment.
    – BitsOfNix
    Jan 7 '13 at 9:04












    Just a note about this solution: YMMV. It's not always "xterm". Using dwm (Dynamic Window Manager) with dmenu on FreeBSD 10 I had to fake the terminal by using "rxvt" to get scenario 1. You can also skip the term setting by adding "set term=rxvt" to your ~/.vimrc file.
    – Ryder
    Mar 4 '15 at 10:12




    Just a note about this solution: YMMV. It's not always "xterm". Using dwm (Dynamic Window Manager) with dmenu on FreeBSD 10 I had to fake the terminal by using "rxvt" to get scenario 1. You can also skip the term setting by adding "set term=rxvt" to your ~/.vimrc file.
    – Ryder
    Mar 4 '15 at 10:12












    up vote
    13
    down vote













    Such behavior was the only thing that kept me away from using screen. It uses "screen" terminal and changing it to "xterm" didn't help.



    Adding altscreen on option in ~/.screenrc solved it. From screen's manual:



    altscreen on|off

    If set to on, "alternate screen" support is enabled in virtual terminals, just like in xterm. Initial setting is `off'.





    share|improve this answer




















    • @Fox OP doesn't mention anything about TERM he is using, so this can be just alternative answer. Anyway this page is on very top while googling for screen issue too.
      – BartBiczBoży
      Nov 10 '16 at 7:16






    • 1




      This did the trick! Keywords: "vim quit leaves visual artifacts terminal"
      – Jay Taylor
      Dec 21 '17 at 17:53














    up vote
    13
    down vote













    Such behavior was the only thing that kept me away from using screen. It uses "screen" terminal and changing it to "xterm" didn't help.



    Adding altscreen on option in ~/.screenrc solved it. From screen's manual:



    altscreen on|off

    If set to on, "alternate screen" support is enabled in virtual terminals, just like in xterm. Initial setting is `off'.





    share|improve this answer




















    • @Fox OP doesn't mention anything about TERM he is using, so this can be just alternative answer. Anyway this page is on very top while googling for screen issue too.
      – BartBiczBoży
      Nov 10 '16 at 7:16






    • 1




      This did the trick! Keywords: "vim quit leaves visual artifacts terminal"
      – Jay Taylor
      Dec 21 '17 at 17:53












    up vote
    13
    down vote










    up vote
    13
    down vote









    Such behavior was the only thing that kept me away from using screen. It uses "screen" terminal and changing it to "xterm" didn't help.



    Adding altscreen on option in ~/.screenrc solved it. From screen's manual:



    altscreen on|off

    If set to on, "alternate screen" support is enabled in virtual terminals, just like in xterm. Initial setting is `off'.





    share|improve this answer












    Such behavior was the only thing that kept me away from using screen. It uses "screen" terminal and changing it to "xterm" didn't help.



    Adding altscreen on option in ~/.screenrc solved it. From screen's manual:



    altscreen on|off

    If set to on, "alternate screen" support is enabled in virtual terminals, just like in xterm. Initial setting is `off'.






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 10 '16 at 4:12









    BartBiczBoży

    300310




    300310











    • @Fox OP doesn't mention anything about TERM he is using, so this can be just alternative answer. Anyway this page is on very top while googling for screen issue too.
      – BartBiczBoży
      Nov 10 '16 at 7:16






    • 1




      This did the trick! Keywords: "vim quit leaves visual artifacts terminal"
      – Jay Taylor
      Dec 21 '17 at 17:53
















    • @Fox OP doesn't mention anything about TERM he is using, so this can be just alternative answer. Anyway this page is on very top while googling for screen issue too.
      – BartBiczBoży
      Nov 10 '16 at 7:16






    • 1




      This did the trick! Keywords: "vim quit leaves visual artifacts terminal"
      – Jay Taylor
      Dec 21 '17 at 17:53















    @Fox OP doesn't mention anything about TERM he is using, so this can be just alternative answer. Anyway this page is on very top while googling for screen issue too.
    – BartBiczBoży
    Nov 10 '16 at 7:16




    @Fox OP doesn't mention anything about TERM he is using, so this can be just alternative answer. Anyway this page is on very top while googling for screen issue too.
    – BartBiczBoży
    Nov 10 '16 at 7:16




    1




    1




    This did the trick! Keywords: "vim quit leaves visual artifacts terminal"
    – Jay Taylor
    Dec 21 '17 at 17:53




    This did the trick! Keywords: "vim quit leaves visual artifacts terminal"
    – Jay Taylor
    Dec 21 '17 at 17:53










    up vote
    0
    down vote













    I have tried all these options but the result was not the one that I expected. !clear would clear the entire screen and does not leave behind the earlier bash commands.



    Simple and correct solution is to set the terminal type string to xterm and terminal speeds to 38400,38400 under Terminal details in putty settings under Connection->Data.



    Save the settings and you are good to go.






    share|improve this answer


























      up vote
      0
      down vote













      I have tried all these options but the result was not the one that I expected. !clear would clear the entire screen and does not leave behind the earlier bash commands.



      Simple and correct solution is to set the terminal type string to xterm and terminal speeds to 38400,38400 under Terminal details in putty settings under Connection->Data.



      Save the settings and you are good to go.






      share|improve this answer
























        up vote
        0
        down vote










        up vote
        0
        down vote









        I have tried all these options but the result was not the one that I expected. !clear would clear the entire screen and does not leave behind the earlier bash commands.



        Simple and correct solution is to set the terminal type string to xterm and terminal speeds to 38400,38400 under Terminal details in putty settings under Connection->Data.



        Save the settings and you are good to go.






        share|improve this answer














        I have tried all these options but the result was not the one that I expected. !clear would clear the entire screen and does not leave behind the earlier bash commands.



        Simple and correct solution is to set the terminal type string to xterm and terminal speeds to 38400,38400 under Terminal details in putty settings under Connection->Data.



        Save the settings and you are good to go.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Aug 21 at 11:59









        Kevin Lemaire

        1,048421




        1,048421










        answered Aug 21 at 7:35









        Vinaya Rajanna

        1




        1



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f60499%2fhow-to-set-the-bash-display-to-not-show-the-vim-text-after-exit%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay