测试方法如下:
测试文件是一个包含100行以下文字的文件
代码: 全选
abcd 0x1234
代码: 全选
case 0x1234://abcd
代码: 全选
:exe "1,100normal ^cecase\<esc>A://\<esc>pj"
而在虚拟机里,这个操作是瞬间完成的,而且硬盘灯也不闪
另外如果用正则表达式做的话也不会出现这种情况
代码: 全选
abcd 0x1234
代码: 全选
case 0x1234://abcd
代码: 全选
:exe "1,100normal ^cecase\<esc>A://\<esc>pj"
代码: 全选
"if has("autocmd")
" au InsertEnter * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"
" au InsertLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape block"
" "au VimLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"
"endif
原来是加了个自动命令来运行外部程序,难怪。reallynotme 写了:自己解决了
我用root运行vim发现就没这问题,猜可能是.vimrc的事
然后把里面这一小段代码注释掉就没事了这个代码是网上找的用来让bash中的vim也能改变光标样式的(事实上并不好使)代码: 全选
"if has("autocmd") " au InsertEnter * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam" " au InsertLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape block" " "au VimLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam" "endif
用惯了gvim用vim实在是受不了那光标Fermat618 写了:原来是加了个自动命令来运行外部程序,难怪。reallynotme 写了:自己解决了
我用root运行vim发现就没这问题,猜可能是.vimrc的事
然后把里面这一小段代码注释掉就没事了这个代码是网上找的用来让bash中的vim也能改变光标样式的(事实上并不好使)代码: 全选
"if has("autocmd") " au InsertEnter * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam" " au InsertLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape block" " "au VimLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam" "endif
我是早习惯了平时在普通模式了,进入插入模式是短暂的,所以没有多少搞不清当前模式的机会。