Cygwin下安装vim后,vim中退格键无法正常使用的解决方法
问题描述:
在Cygwin中安装完vim后
进入vim,发现上下左右键和退格键都无法正常使用
问题分析:
首先考虑到的就是缺少vim的配置文件,首先查看/etc路径下是否有vim的配置文件
admin@ThinkPad /etc
$ cd /etc
admin@ThinkPad /etc
$ ls -a|grep vimrc发现/etc下没有vim的全局配置文件,然后再查找当前用户的vim配置文件.vimrc
admin@ThinkPad /etc
$ cd ~
admin@ThinkPad ~
$ ls -a|grep .vimrc发现也没有,可以确定是缺少vim的配置文件导致部分按键设置没有生效
解决方式:
从文件共享目录中拷贝一个vim的配置文件至当前用户家目录下即可
admin@ThinkPad ~ $ cp /usr/share/vim/vim74/vimrc_example.vim ~/.vimrc admin@ThinkPad ~ $ cat ~/.vimrc " An example for a vimrc file. " " Maintainer: Bram Moolenaar <[email protected]> " Last change: 2011 Apr 15 " " To use it, copy it to " for Unix and OS/2: ~/.vimrc " for Amiga: s:.vimrc " for MS-DOS and Win32: $VIM\_vimrc " for OpenVMS: sys$login:.vimrc " When started as "evim", evim.vim will already have done these settings. if v:progname =~? "evim" finish endif " Use Vim settings, rather than Vi settings (much better!). " This must be first, because it changes other options as a side effect. set nocompatible " allow backspacing over everything in insert mode set backspace=indent,eol,start ......
相关推荐
alenwork 2015-08-18
xujidong0 2015-08-18
shutFuckingup 2014-04-29
robertzhouxh 2012-10-18
alenwork 2012-01-02
linzb 2013-03-04
wyjq 2015-02-05
CoderMannul 2012-07-04
oracleKing 2014-02-05
蒋胜凡广博天下客 2013-07-26