Solution to the problem that up, down, left, and right become abcd in vi editing error in Ubuntu

When using vi to edit in Ubuntu, pressing the up, down, left, and right keys turns into ABCD. Vi editing error. If you press the up, down, left, and right keys in Vi but characters such as abcd appear, it may be because there is a problem with your terminal settings, causing Vi to be unable to correctly parse the arrow keys. In the vi editor, the up, down, left, and right keys turn into ABCD, which may be because the vi compatibility mode is turned on. You can try the following methods to solve this problem. You can try the following methods: Method 1:…