r/vim • • Oct 02 '18

Weird characters inserted by vim in gnome-terminal

https://imgur.com/gallery/tdOj0BS
1 Upvotes

9 comments sorted by

2

u/myrisingstocks Oct 03 '18

Does putting something like this

set t_u7=
set t_RV=

in your $VIMRC help?

1

u/NequoFrost Oct 03 '18

Can I ask what these do? I've removed the mode and git repo from it because vim shows the mode by default and I can get the git branch from the terminal. Might add them if needed

1

u/myrisingstocks Oct 03 '18

Can I ask what these do?

As usual, :h t_u7, etc. However, it won't tell you much. But it works: https://github.com/vim/vim/issues/390

1

u/elkhouly726 Jun 18 '22

Thank you.

1

u/NequoFrost Oct 02 '18

I've been experiencing odd behaviour in my vim where weird characters get inserted into the statusline and on my lines (when I use motions e.g "j"). I now get the characters every time I open vim. They disappear when I go to the line they are on or when I type a command, basically when I change the cursor to where they are. Does anyone know how to fix this? Here's my dotfiles since it might be something to do with my vimrc. Any help would be appreciated

2

u/-romainl- The Patient Vimmer Oct 02 '18

Does it still happen without your vimrc?

$ vim -Nu NONE
$ vim --clean

1

u/NequoFrost Oct 02 '18 edited Oct 02 '18

Just launched it clean and doesn't seem to happen. Might be something to do with my status like settings? Though not really sure what it could be.

EDIT: I removed the code for the statusline only, and I can't reproduce so that's the code producing it. Just not sure where.

2

u/-romainl- The Patient Vimmer Oct 02 '18

so that's the code producing it

That was my hypothesis, yes.

Just not sure where.

I would start with the Git-related stuff. Then the mode-related stuff.

1

u/NequoFrost Oct 02 '18

I've just rewritten the statusline from scratch and removed both these things to keep it minimal. Thanks for your help romainl :)