In Linux, using Vi is a solution that cannot be used when the direction keys change garbled back keys.
Editing some files in Linux involves the vi editor. In Linux, when vi is initially used, the cursor is not moved when the direction keys are used in editing mode, however, if [A [B [C [D and other letters are displayed in the command line and the editing is incorrect, the Backspace key cannot be used at ordinary times, delete can only be used. There are many answers to this question on the Internet, such as installing the full version of vim and editing/etc/vim/vimrc. tiny and other methods are messy. Here I will make a detailed summary:
1. edit/etc/vim/vimrc. tiny
Because the owner of/etc/vim/vimrc. tiny is the root user, you must modify the file with the root permission. The penultimate sentence in this file is "set compatible", as shown below:
Change "compatible" to "nocompatible" to incompatible mode to solve the problem of changing the direction key to ABCD. Next, we need to solve the problem of the Backspace key, which is also very simple. In the previous sentence, we will add one more sentence:
- Set backspace = 2
As shown in the following figure:
You can solve the problem. At this time, no matter which user, vi can easily edit files according to our habits.