Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are a few of the main differences between vi and vim? Are there any significant keyboard shortcut differences, any features that one has that the other does not? Yes, I do know that I asked another question similar to this (Vi vs vim, or, is there any reason why I would ever want to use vi?), but the purpose of that question was not a complete comparison between the two, but merely asking if there were any possible situations where vi had the advantage. This post is a direct comparison between the feature-sets of vi and vim.

Edit: I was wrong, this is not a comparison between the features of vi and vim. vim, being Vi IMproved, has many, many more features then vi. What I am asking is, if you have been using vi all your life and one day you sit down and start using vim, what will be different? Or if you were a vim user previously and tried out vi, what differences would you notice?

share|improve this question
on a Linux system, I'm not sure you'll be getting vi. As I see, it is linked to vim. – mdpc Feb 4 '13 at 22:57

It's a bit like asking about bash and sh. ViM has a special option compatible (command line -C) - see the ViM manual, then switch it on and try to do some work. And that's not even halfway to vi from 20-30 years ago (when keyboards/terminals often lacked arrow and other - today common - special keys by the way).

Hence if you are used to ViM and end up in front of vi you can still do your stuff but much slower, because most of the thing just doesn't work (either at all or the way you expect).

share|improve this answer
Could you elaborate on some of the things that "just don't work"? – InkBlend Feb 23 '13 at 18:42
In my case for example Insert doesn't work at all, arrow keys in insert mode produce characers, since the terminal sequences are not interpreted, undo behaves differently and much more. Just read help 'compatible' in ViM to get some idea on what can change. – peterph Feb 23 '13 at 21:22

Immediately for me, syntax highlighting. Then auto indent and auto comment lines, due to my continual use of paste from my desktop.

Also, vim has the additional functionality of telling you the differences

:help vi_diff

:help vim-additions

share|improve this answer

If by vi you mean the original vi, that one was rather broken, had tons of "undocumented commands" (I still fondly remember a long document giving the undocumented and halfway (or more) broken, idiosincratic, totally irregular, and sometimes lifesaving, commands). The extension language(s) for vim are much moore powerfull. Just look at the name's meaning: *V*i *Im*proved, vim undestands itself as bearing vi's flag to the future. Unless you go into nooks and cranies, both schould work the same, with vim having the advantage of continuing development.

share|improve this answer

For me, Vim shows far less idiosyncrasies than vi; e.g. for a change command, the text is removed and you insert text instead of a $ sign placed at the end and you override text until that sign. Or multi-level undo. Or window splits and buffer management.

Then there's the configurability: With vi, you may have a few mappings, change some options. Vim has a plethora of plugins on vim.org, comes with lots of syntax and filetype settings, and has a great community.

Finally, under the hood, is has Vimscript with (since version 7) powerful data types, and the possibility to use a variety of alternative scripting languages like Python, Perl, or Ruby.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.