Home » Questions » Computers [ Ask a new question ]

When I ssh into my remote server, and use VIM to edit files, things are very strange

When I ssh into my remote server, and use VIM to edit files, things are very strange

For instance, when i press 'I' to go into insert mode, and then use the arrow keys to move around the line, the left arrow ends up inserting the letter 'D' one line above the line I was intending to edit, the right arrow inserts a 'C' etc. Is this a server configuration thing, an SSH thing, a vim thing or what? Any advice is appreciated, I realize this is not exactly a programming question but I'm not sure where exactly else to file it.

Asked by: Guest | Views: 360
Total answers/comments: 1
Guest [Entry]

"This page says that manually setting the TERM variable is almost never a good idea, and suggests some alternatives:

wiki.archlinuxdotorg/index.php/Why_don%27t_my_Home_and_End_keys_work_in_terminals%3f

Sure enough, for me, just unsetting my TERM variable fixed the problem, plus other problems like terminal colors too."