I know a bit about *NIX text editors (currently migrating from nano
to vim
), and, after looking around a bit on the Unix & Linux SE, have noticed that vi
is used instead of 'vim' in a fair number of questions. I know that 'vim' stands for 'Vi IMproved', and, with that in mind, am wondering why anyone would rather use vi instead of vim. Does vi have any significant advantage over vim?
Edit: I think that my question is being misinterpreted. I know that vim is, for the most part, significantly more powerful and feature-complete then vi is. What I want to know is if there are any possible cases where vi has an advantage over vim, such as less memory use, prevalence on *nix systems, etc.
Best Answer
vi
is (also) a POSIX standard editor. There are plenty of implementations andvim
is likely the most popular.While many traditional Unix compliant OSes provide
vi
implementations very close to the standard,vim
has added a lot of extra features that make it a double-edged sword.Of course, these extensions are usually designed to ease the editing process and provide useful features and functionalities. However, once you are used to some of them (not the cosmetic ones like syntax coloring but those that change the editor's behavior) you can easily forget they are specific; and using a different implementation, including the ones based on the original BSD code can be very frustrating. The opposite is also true.
This is quite similar to the issue that happens with scripts using non POSIX bashisms faced to more orthodox shell implementations like
dash
orksh
.