Solve the problem that the vi editor cannot use the arrow keys and backspace keys

 

1. When using the vi command, the file cannot be edited normally, and many letters always appear when using the arrow keys

This problem is mainly that the new system has vi directly installed, but not vim. Because vi cannot directly press the backspace key to delete characters, so when you use the backspace key to delete characters, those characters will disappear only when you press esc. . . vim can edit characters directly like notepad!

 

I found a method on the Internet and the problem has been solved to share:

As long as the following two commands are executed in sequence, the problem of changing the letters of the direction keys of the vi editor under Ubuntu can be perfectly solved.

1. Execute the command sudo apt-get remove vim-common

2. Execute the command sudo apt-get install vim

Try the Vi editor again, is it back to normal?

 

2. Modify the /etc/vim/vimrc.tiny file and set the set compatible to set nocompatible. This is because sometimes the system defaults to vim compatible with vi, so use the vi command.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326480440&siteId=291194637