Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim shows garbage characters

Tags:

vim

plugins

When I start vim with one of these plugins:

  • TagBar
  • Session

I see sometimes garbage characters in the buffer when I open vim.

Here are these characters:

;2R^[[>1;2802;0c

By uninstalling these two plugins, I don't see these garbage characters anymore.

If I type dd, it does not even delete these characters. Vim says the buffer is empty.

Putting this command at the end of my .vimrc is a workaround for this problem:

autocmd VimEnter * redraw!

With this, these characters are deleted immediately.

How can I fix this problem?

like image 887
antoyo Avatar asked Feb 07 '14 03:02

antoyo


1 Answers

Vim asks the terminal for its version, what you're seeing is the response (cp. :help v:termresponse). It only appears printed in the terminal; that's why you can't "edit" it and it appears after a redraw.

Why Vim doesn't properly receive it, I don't know. Switching the terminal program might help. You could also try to suppress the query via :set t_RV= in your ~/.vimrc.

like image 84
Ingo Karkat Avatar answered Oct 18 '22 03:10

Ingo Karkat