Vi Editor keys adding characters
You are using Vi Editor and press the backspace and it adds a new line with letter “D” in it.
Or hitting arrow keys adds characters.
Or a whole other random behavior and you don’t understand what’s happening.
Don’t worry here’s the solution.
Firstly, you need to use Vim 🙂
To check if vim is already installed just type the command:
If not installed just run command:
apt-get install vim
Then check if vi editor works fine now.
If problem still persists then open file:
Add this line at the top of the file:
This should stop the weird behavior.