This question already has an answer here:
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.
Please help me in resolve this problem.