Home > System Tutorial > LINUX > body text

How to solve the problem of pressing the up, down, left and right keys to input ABCD in the vi editor in Ubuntu

王林
Release: 2024-01-16 13:21:16
forward
1850 people have browsed it

When using Ubuntu's vi editor, sometimes the up, down, left, and right keys turn into ABCD. Let me introduce the solution to this situation.

1. As shown in the figure, when using vi to edit the /etc/profile file, press the up, down, left and right keys in the editing state to change to ABCD.

How to solve the problem of pressing the up, down, left and right keys to input ABCD in the vi editor in Ubuntu

2. At this time, press Esc to exit the editing state, and then enter: q! to exit file editing.

How to solve the problem of pressing the up, down, left and right keys to input ABCD in the vi editor in Ubuntu

3. The reason for this problem is that there is a problem with the original vim-common component. You can solve this problem by uninstalling the original vim-common component and installing a new vim.

4. Use the command

after exiting file editing.

sudo apt-get remove vim-common

Uninstall the original vim-common component.

How to solve the problem of pressing the up, down, left and right keys to input ABCD in the vi editor in Ubuntu

5. After the uninstallation is complete, use the command

sudo apt-get install vim

Install vim.

How to solve the problem of pressing the up, down, left and right keys to input ABCD in the vi editor in Ubuntu

6. After the installation is complete, open the profile file for editing and return to normal.

How to solve the problem of pressing the up, down, left and right keys to input ABCD in the vi editor in Ubuntu

The above is the detailed content of How to solve the problem of pressing the up, down, left and right keys to input ABCD in the vi editor in Ubuntu. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template