取消VIM鼠标进入visual模式,并解决VIM下无法使用backspace(^$乱码)

1,有的Linux系统中,vim默认鼠标拖拽会进入visual模式,对习惯左键选中而后中键粘贴的人来说很不方便。

这里介绍了如何取消这个设定。

cp vimrc_example.vim ~/.vimrc (In my system: /usr/share/vim/vim80/defaults.vim)

vim ~/.vimrc

Go to line  "source $VIMRUNTIME/defaults.vim" and press "gf" when cursor on defaults.vim (In my system: /usr/share/vim/vim80/defaults.vim)

Please comment:

" In many terminal emulators the mouse works just fine.  By enabling it you
" can position the cursor, Visually select and scroll with the mouse.
"if has('mouse')
"  set mouse=a
"endif

2,公司服务器上,在终端打开vim总是无法使用backspace,很不爽,解决办法:stty sane

阅读更多

没有更多推荐了,返回首页