Ubuntu – the difference between Vi and Vim

vim

I would appreciate it if someone can let a newbie know what the differences are between vi and vim. I've heard Vim is a successor to vi but whenever I try to open vi in Ubuntu it opens vim instead.

Best Answer

Functionally, vim is almost a proper superset of vi. Therefore, everything that is in vi is available in vim.

Vim adds onto those features. Here are a some of the extended vim features:

  • Vim has been ported to a much wider range of OS's than vi.
  • Vim includes support (syntax highlighting, code folding, etc) for several popular programming languages (C/C++, Python, Perl, shell, etc).
  • Vim integrates with cscope.
  • Vim can be used to edit files using network protocols like SSH and HTTP.
  • Vim includes multilevel undo/redo.
  • Vim allows the screen to be split for editing multiple files.
  • Vim can edit files inside a compressed archive (gzip, zip, tar, etc).
  • Vim includes a built in diff for comparing files (vimdiff).
  • Vim includes support for plugins, and finer control over config and startup files.
  • Vim can be scripted with vimscript, or with an external scripting language (e.g. python, perl, shell).

There are many more differences. Refer below sources which are few of good places to start finding out more.

Source: Vim.Org, Vim on Wikpedia.

Hope it helps! :)