不久前我在 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 <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
Edit:
我尝试截取问题的屏幕截图,但意识到截取屏幕截图后,gvim 会有点“刷新”,并且再次出现丢失的字体。 Alt-Tab 键也有帮助。但我还没有找到解决这个问题的永久方法。
此外,将光标移到缺少字符的文本行上有时会导致其他字符丢失,而旧字符出现。有时,光标还会留下其他光标的静态图像。
我在windows上也安装了vim,试试看是否出现同样的问题。
屏幕截图,注意左下角的空矩形:
Update: So I've reinstalled ubuntu (this time to 14.04), gvim and vim. There are still some annoying rendering issues, although it manifests differently (see screenshot 2). Line numbers and percentages go haywire and scroll along with the page when I scroll down using "j". Only happens for vim so far. Gvim is working okay.
所以我发现了问题所在。事实证明,在我从 .vimrc 中删除一行后,奇怪的视觉渲染错误就消失了。
没想到这条看似无害的线是原因:
set lines=50 columns=100
但不确定为什么会出现这种情况。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)