How do you reset the default for vi?

I am currently using VI on a remote host, and for some reason, several commands do not display correctly. For example, if you press the lowercase x instead of deleting the character under the cursor, it actually deletes the character with two spaces before the cursor, so if the following text is BOTY and I have a cursor over T, instead of deleting TO, it will be deleted by making the word BTY. In addition, when inserting text instead of a VI that inserts a character under the cursor, it enters the character in two spaces before the cursor, so if I have the following text HT and want to insert ML instead of writing HTML VI, it will write HMLT.

Does anyone know what would cause this and how can I fix it, or how to reset all the settings in VI by default, because these are probably not the only elements that are not displayed correctly?

thanks

+6
source share
3 answers

In your home, look at a file named .exrc (.vimrc for vim). It contains the vi configuration, if you clear it (backup before), vi will revert to the default configuration.

+3
source

If you just want to reset all things to default, this is very simple, simple: install all &

+2
source

It looks like you are using the classic "VI" instead of "VIM (VI IMproved)." If you are root on the machine, try installing VIM. I experience this behavior on Ubuntu every time after a new os installation.

0
source

Source: https://habr.com/ru/post/887734/


All Articles