在安装完Debian后,vi编辑器键盘不能正常使用,使用下面方法解决:

  1. 编辑文件/etc/vim/vimrc.tiny,将 compatible改成nocompatible非兼容模式;

  2. 并添加一句:set backspace=2(注:主要看最后几行)

cat /etc/vim/vimrc.tiny

" Vim configuration file, in effect when invoked as "vi". The aim of this
" configuration file is to provide a Vim environment as compatible with the
" original vi as possible. Note that ~/.vimrc configuration files as other
" configuration files in the runtimepath are still sourced.
" When Vim is invoked differently ("vim", "view", "evim", ...) this file is
" _not_ sourced; /etc/vim/vimrc and/or /etc/vim/gvimrc are.

" Debian system-wide default configuration Vim
set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim90,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after

set nocompatible
set backspace=2

" vim: set ft=vim: