我不久前在ubuntu 12.04上安装了vim.有时当我在代码上运行光标(使用键盘,而不是鼠标)时,文本会消失,就像渲染角色时出现问题一样.当我再次运行光标时,它通常会重新出现.
这似乎是随机发生的,但往往足以令人恼火.
为了更清楚,这是一个例子:
1.原文:
嗨!你今天好吗.
2.光标在其上运行后的文本
H !怎么回事今天.
3.再次将光标移到句子上
一世!你怎么样?
最后,将光标在句子上运行几次后,它恢复正常
.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:!python % 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也有帮助.但我还没有找到解决这个问题的永久办法.
此外,将光标移动到缺少字符的文本行上有时会导致其他字符在旧字符出现时丢失.有时光标也会留下其他光标的静态图像.
我也在Windows上安装了vim,应该在那里尝试看看是否出现同样的问题.
截图,注意左下方的空矩形:
更新:所以我重新安装了ubuntu(这次是14.04),gvim和vim.仍有一些令人讨厌的渲染问题,尽管它有不同的表现(见截图2).当我使用"j"向下滚动时,行号和百分比会出现乱码并与页面一起滚动.到目前为止只有vim才会发生.Gvim工作正常.