问题描述:
在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 <Bram@vim.org>
" 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
......
以上这篇Cygwin下安装vim后,vim中退格键无法正常使用的解决方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持软件开发网。