解决vi编辑时,上下左右键、删除按键异常问题
作者:互联网
问题
在ubuntu下使用vi编辑,输入上下左右键,光标没有对应移动,而是出现了异常字符;按删除按键,没有正常删除对应内容。
解决
在vi配置文件/etc/vim/vimrc.tiny
增加如下2行可以解决上述问题:
set nocompatible
set backspace=2
修改后文件类似如下:
user@PC:~$ 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/vim81,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
set nocompatible
set backspace=2
" vim: set ft=vim:
标签:set,vimrc,vi,vim,按键,configuration,上下左右,Vim 来源: https://blog.csdn.net/wuu19/article/details/110703286