The teacher assigned each of us an Ubuntu virtual machine, said to do the experiment. I certainly do not mind, my favorite is Ubuntu, but for some of the unfamiliar to Linux students, may be a very difficult experimental process.
The teacher wants us to edit some files under Ubuntu, which involves the VI editor. In Ubuntu, the initial use of the VI is a problem, that is, when using the arrow keys in edit mode, does not make the cursor move, but in the command line appears [A [B] [C [d] letters, and editing errors, even the usual about the backspace (backspace key) can not be used, can only be deleted with delete. In response to this question, there are many online answers, such as the installation of the full version of Vim Ah, editing/etc/vim/vimrc.tiny and other methods, very miscellaneous very messy, here I will do a detailed summary of it:
First, the editor/etc/vim/vimrc.tiny
Since the owner of the/etc/vim/vimrc.tiny is the root user, the file must be modified under root privileges. Very simply, the penultimate sentence in this file is "set compatible", as follows:
Changing the "compatible" to "nocompatible" non-compatible mode solves the problem of the direction key becoming ABCD. The next problem to solve the backspace key is also very simple, in the sentence after just add a sentence:
- Set backspace=2
becomes as shown:
Hint: There is no space on either side of the equals sign in set backspace=2 here
can solve the problem. This time, regardless of which user, the use of VI can be very convenient according to our custom to edit the file.
Under Ubuntu use VI is the direction key garbled backspace key cannot use the solution