滚动超出范围时,Vim 会持续冻结/挂起

滚动超出范围时,Vim 会持续冻结/挂起

每当我滚动超出界限(在任何事情上走得太远)时,我的 Vim 就会不断闪烁和冻结(不确定是否要用正确的词来形容)。

例如:如果我在第一行并尝试向上移动 / 在最后一行并尝试向下移动(特别是这个,我经常使用鼠标滚轮滚动,所以这很快就会变得非常烦人)如果我进入命令模式,然后尝试按 tab 键对不存在的文件/命令使用自动完成功能

等等。

这是我的 vimrc。

  1 set vb
  2 
  3 " incremental search
  4 set incsearch
  5 set ignorecase
  6 set smartcase
  7 
  8 " syntax highlighting
  9 set bg=dark
 10 syntax on
 11 
 12 filetype plugin on
 13 
 14 " autoindent
 15 set autoindent
 16 set smartindent
 17 
 18 " 4 space tabs
 19 set tabstop=4
 20 set expandtab
 21 set shiftwidth=4
 22 set shiftround
 23 
 24 " show matching brackets
 25 set showmatch
 26 
 27 " show line numbers
 28 set number
 29 
 30 " dont use Q for Ex mode
 31 map Q :q
 32 
 33 " make tab in v mode ident code
 34 vmap <tab> >gv
 35 vmap <s-tab> <gv
 36 
 37 " make tab in normal mode ident code
 38 nmap <tab> I<tab><esc>
 39 nmap <s-tab> ^i<bs><esc>
 40 
 41 " paste mode - this will avoid unexpected effects when you
 42 " cut or copy some text from one window and paste it in Vim.
 43 set pastetoggle=<F11>
 44 
 45 " comment/uncomment blocks of code (in vmode)
 46 vmap _c :s/^/#/gi<Enter>
 47 vmap _C :s/^#//gi<Enter>
 48 
 49 " my perl includes pod
 50 "let perl_include_pod = 1
 51 
 52 " syntax color complex things like @{${"foo"}}
 53 "let perl_extended_vars = 1
 54 colors koehler
 55 set backspace=indent,eol,start
 56 "set textwidth=78
 57 set scrolloff=2
 58 "set title

这是系统 vimrc(这是在工作,所以我不能弄乱它)

  1 if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
  2    set fileencodings=ucs-bom,utf-8,latin1
  3 endif
  4 
  5 set nocompatible    " Use Vim defaults (much better!)
  6 set bs=indent,eol,start     " allow backspacing over everything in insert mode
  7 "set ai         " always set autoindenting on
  8 "set backup     " keep a backup file
  9 set viminfo='20,\"50    " read/write a .viminfo file, don't store more
 10             " than 50 lines of registers
 11 set history=50      " keep 50 lines of command line history
 12 set ruler       " show the cursor position all the time
 13 
 14 " Only do this part when compiled with support for autocommands
 15 if has("autocmd")
 16   augroup redhat
 17   autocmd!
 18   " In text files, always limit the width of text to 78 characters
 19   autocmd BufRead *.txt set tw=78
 20   " When editing a file, always jump to the last cursor position
 21   autocmd BufReadPost *
 22   \ if line("'\"") > 0 && line ("'\"") <= line("$") |
 23   \   exe "normal! g'\"" |
 24   \ endif
 25   " don't write swapfile on most commonly used directories for NFS mounts or USB sticks
 26   autocmd BufNewFile,BufReadPre /media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
 27   " start with spec file template
 28   autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
 29   augroup END
 30 endif
 31 
 32 if has("cscope") && filereadable("/usr/bin/cscope")
 33    set csprg=/usr/bin/cscope
 34    set csto=0
 35    set cst
 36    set nocsverb
 37    " add any database in current directory
 38    if filereadable("cscope.out")
 39       cs add cscope.out
 40    " else add database pointed to by environment
 41    elseif $CSCOPE_DB != ""
 42       cs add $CSCOPE_DB
 43    endif
 44    set csverb
 45 endif
46 
 47 " Switch syntax highlighting on, when the terminal has colors
 48 " Also switch on highlighting the last used search pattern.
 49 if &t_Co > 2 || has("gui_running")
 50   syntax on
 51   set hlsearch
 52 endif
 53 
 54 filetype plugin on
 55 
 56 if &term=="xterm"
 57      set t_Co=8
 58      set t_Sb=^[[4%dm
 59      set t_Sf=^[[3%dm
 60 endif
 61 
 62 " Don't wake up system with blinking cursor:
 63 " http://www.linuxpowertop.org/known.php
 64 let &guicursor = &guicursor . ",a:blinkon0"

什么原因导致了这个问题?

答案1

我不知道冻结的原因,但闪烁是由你的第一行引起的,~/.vimrc:set vb视觉钟,即闪烁而不是发出哔哔声。

答案2

我必须在这里重复一下伊夫塞日对我有用的唯一方法是禁用蜂鸣和闪烁将以下内容添加到我的.vimrc

set noeb vb t_vb=

相关内容