Skip to main content

Hitting arrow keys adds characters in vi editor

When I tried to use arrow keys in insert mode in vi editor the following characters are being inserted in the editor:
  • for  I get B,
  • for  I get A,
  • for  I get D,
  • for  I get C.
Here is a basic trick to solve this problem

Open terminal 

If you don't already have a .vimrc file in your home directory, create one using this:
  • vim ~/.vimrc
Add this line to the top of the file:
  • set nocompatible

If you don't already have a .vimrc file in your home directory, create one using this:
vim ~/.vimrc
Add this line to the top of the file:
set nocompatible
Save the file and this should fix the problem for you. :)
If you face problem in saving 
press ESC button and type :x! or :x press Enter 
now you can proceed with vim or vi

Thanks for reading
if any support or feedback or issue comment please:!

Comments

Popular posts from this blog

Grub Repair in Ubuntu

Boot Ubuntu from Ubuntu Bootable Drive Try ubuntu  Terminal (Ctrl+alt+T) pe  Open a Terminal window from the Dash and run the following commands to install and launch Boot Repair: sudo apt-add-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install -y boot-repair boot-repair

What is TCP PORT 443 ? Why we need SSL?

What are PORTS? Ports are used in the TCP [RFC793] to name the ends of logical connections which carry long term conversations.

How to completely reset ubuntu/linux networking settings?

In order to reset your networking setting in Ubuntu/Linux from scratch follow the steps below: