z/OS Tools & Language

Expand all | Collapse all

Vim shows garbage

  • 1.  Vim shows garbage

    Posted 03-31-2020 07:29

    Hi all, I have installed vim along with bash, gzip, git.
    I have followed all the READMEs (at least I think so) and everything is apparently working, but vim shows a strange behavior: every time I start it, the first line shows garbage characters. As soon as I scroll, the garbage disappears and the real text appears.
    Unfortunately, new files or files which only contain one line cannot be scrolled, so I cannot see the first line.

    Thank you in advance!

  • 2.  RE: Vim shows garbage

    Posted 04-01-2020 05:20

    Do you have env variables TERMINFO and/or TERM set to anything? Unfortunate settings here could make vim choke.

  • 3.  RE: Vim shows garbage

    Posted 04-01-2020 06:38

    This is what I have now:

    SIGDC@BVLSYSB [~/test]$ env|grep -i term

    but even plain xterm gives the problem.

  • 4.  RE: Vim shows garbage

    Posted 04-01-2020 06:57

    Try to unset TERMINFO. Perhaps this interferes.

    unset TERMINFO

  • 5.  RE: Vim shows garbage

    Posted 04-01-2020 07:12

    Did not make a difference, unfortunately:

  • 6.  RE: Vim shows garbage

    Posted 04-01-2020 09:26

    Just to make sure. I guess you have all the env var inplace which are required by vim

     export _BPXK_AUTOCVT="ON"
     export _TAG_REDIR_ERR="txt"
     export _TAG_REDIR_OUT="txt"
     export _TAG_REDIR_IN="txt"
     export VIM="${TGTDIR}/share/vim/vim80"
     export PATH="${TGTDIR}/bin:$PATH"

    where TGTDIR is the installation directory of vim

  • 7.  RE: Vim shows garbage

    Posted 04-02-2020 03:30

    Hi Manfred,
    this is what I have in my /etc/profile:

    # ======================================================================
    # Impostazioni per git e altri port della Rocket Software
    # ======================================================================
    export PATH=/bkd/bin:$PATH
    export MANPATH=$MANPATH:/bkd/man
    export INFOPATH=$INFOPATH:/bkd/info
    export CHARSETALIASDIR=/bkd/lib
    export GIT_SHELL=/bkd/bin/bash
    export GIT_EXEC_PATH=/bkd/libexec/git-core
    export GIT_TEMPLATE_DIR=/bkd/share/git-core/templates
    export GIT_MAN_PATH=/bkd/man
    export PERL5LIB=/bkd/share/perl/5.24.1:/bkd/lib/perl5
    export LIBPATH=$LIBPATH:/bkd/lib/perl5/5.24.0/os390/CORE
    export _BPXK_AUTOCVT=ON
    export _TAG_REDIR_ERR=txt
    export _TAG_REDIR_IN=txt
    export _TAG_REDIR_OUT=txt
    export TERMINFO=/bkd/share/terminfo
    export VIM=/bkd/share/vim/
    git config --global core.editor /bkd/bin/vim
    git config --global core.pager /bin/more

    I changed the VIM variable to:


    but that, again, made no difference.


  • 8.  RE: Vim shows garbage

    Posted 04-02-2020 03:50

    I have also tried three different terminal emulators:

    • remmina (SSH connection)
    • konsole
    • EasySSH

    All three show garbage characters upon opening vim.

  • 9.  RE: Vim shows garbage

    Posted 04-02-2020 04:10

    I did one more test with MobaXTerm, and it seems it shows no garbage.
    So it would seem that the problem is in the terminal emulator, even though I am quite surprised that three out of four show the problem.
    Do you have suggestions on more tests to do to identify what exactly is the problem?

  • 10.  RE: Vim shows garbage

    Posted 04-03-2020 04:40

    This all is strange, and I have to admit that I have not understood fully these terminal issues regarding vim. For instance, I have a problem to get colors in vim although on a different systems (same settings) there are colors.

    Here, running Linux (i.e. Fedora 31), I ssh-connect using xfce4-terminal or mate-terminal. Both working fine.

    Perhaps the Rocket people have ideas to help.

  • 11.  RE: Vim shows garbage

    Posted 04-03-2020 05:54

    Thank you @ManfredLotz for all the help so far.
    Let’s hope that someone from Rocket Software will take a look at this thread.

  • 12.  RE: Vim shows garbage

    Posted 04-03-2020 08:58

    Try to append the following line to .vimrc:

    set t_RV=

    and restart vim. I hope this will help.

  • 13.  RE: Vim shows garbage

    Posted 04-06-2020 03:33

    @msviridov it worked!! Thank you!!
    What does this option do? I did not find documentation.


  • 14.  RE: Vim shows garbage

    Posted 04-07-2020 02:11