How do you reset defaults for VI?
Solution 1
If you just want to reset all things to default, it's very simple, just :set all&
Solution 2
In your home, look at a file called .exrc (.vimrc for vim). It contains vi configuration, if you clear it (make a backup before), vi will return to default configuration.
Matt Pascoe
I am currently working for CME Group, Inc. as a QA Analyst 2. I run performance testing on their electronic trading platform called Globex. Before working for CME Group, Inc. I was a student at DeVry University studying for my Bachelors of Science in Computer Information Systems. I have worked with C++ for a number of years and am starting to dable in Java here and there. Also, because of the nature of my job I occasionally have to pick up a scripting language to help automate tasks.
Updated on June 09, 2022Comments
-
Matt Pascoe almost 2 years
I am currently using VI on a remote host and for some reason a number of the commands are mapped incorrectly. For example when pressing lower case x, instead of it deleting the character under the cursor it actually deletes the character two spaces before the cursor, so if the following text is entered BOTY and I have the cursor over the T instead of removing T the O will be removed making the word BTY. Also when inserting text, instead of VI inserting the character under the cursor it will enter the the character two spaces before the cursor so if I have the following text HT and I want to insert ML instead of writing HTML VI will write HMLT.
Does anyone know what would be causing this and how I can fix it or how to reset all settings in VI to default because this is probably not the only items mapped incorrectly?
Thanks
-
sapht almost 13 yearsThat sounds like it might be a terminfo issue. Is vi the only program you're having troubles with?
-