Ubuntu上的Vim:文字渲染错误,重复和消失的奇怪

我不久前在Ubuntu 12.04上安装了vim。 有时当我用光标(使用键盘而不是鼠标)运行代码时,文本消失了,就好像渲染字符时出现问题一样。 当我再次移动光标时,通常会重新出现。

这似乎是非常随机的发生,但往往足以使其刺激。

为了更清楚一点,下面是一个例子:

1.原文:

嗨! 你今天好吗。

2.光标移过来后的文字

H ! 今天怎么回事

3.再次将光标移动到句子上

一世! 你好吗?

  1. 最后,在光标上移动光标几次后,恢复正常

.vimrc文件:

set nocompatible " be iMproved syntax on "Syntax highlighting filetype off set rtp+=~/.vim/bundle/vundle/ call vundle#rc() colorscheme evening "font set nu set guifont=Monospace\ 12 set foldmethod=indent set foldlevel=99 set lines=50 columns=80 set ignorecase "searching is not case sensitive set smartcase "if a pattern contains uppercase, searching IS case sensitive set autoindent set tabstop=4 winpos 1068 24 " Type 'za' to open and close a fold " let Vundle manage Vundle Bundle 'gmarik/vundle' " original repos on github Bundle 'tpope/vim-fugitive' " vim-scripts repos Bundle 'L9' Bundle 'FuzzyFinder' " git repos on your local machine (ie. when working on your own plugin) "Bundles I install Bundle 'https://github.com/scrooloose/nerdtree.git' Bundle 'scrooloose/syntastic' Bundle 'dbakker/vim-lint' Bundle 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'} "snipmate Bundle "MarcWeber/vim-addon-mw-utils" Bundle "tomtom/tlib_vim" Bundle "snipmate-snippets" "Install snipmate: Bundle "garbas/vim-snipmate" Bundle "sudar/vim-arduino-snippets" "PYTHON filetype plugin indent on Bundle 'klen/python-mode' autocmd BufRead *.py nmap <F5> :!python %<CR> set laststatus=2 " :BundleList - list configured bundles " :BundleInstall(!) - install(update) bundles " :BundleSearch(!) foo - search(or refresh cache first) for foo " :BundleClean(!) - confirm(or auto-approve) removal of unused bundles " see :h vundle for more details or wiki for FAQ " NOTE: comments after Bundle command are not allowed.. " ARDUINO autocmd! BufNewFile,BufRead *.pde,*.ino setlocal ft=arduino 

编辑:

我尝试了一下这个问题的截图,但是意识到在截图之后,gvim会进行“刷新”,并且丢失了字体。 Alt-Tabbing也有帮助。 但是我还没有find永久解决这个问题的方法。

此外,将光标移动到缺less字符的文本行上时,有时会导致其他字符在旧字符出现时丢失。 光标有时也会留下其他光标的静态图像。

我也在Windows上安装了vim,试着在那里看看是否出现同样的问题。

截图,请注意左下方的空白矩形:

在Ubuntu上使用GVim在屏幕上消失的文字

更新:所以我已经重新安装了Ubuntu(这次是14.04),gvim和vim。 仍然有一些令人讨厌的渲染问题,虽然它有不同的performance(见截图2)。 当我使用“j”向下滚动时,行号和百分比不合适,并与页面一起滚动。 只有vim到目前为止。 Gvim工作正常。 在这里输入图像说明

所以我发现了什么问题。 当我从.vimrc中删除一行后,奇怪的可视化渲染错误消失了。

没想到这个无害的线条成为了原因:

 set lines=50 columns=100 

不知道为什么这样的情况。