35

How can I check what version of the vi editor I have? What's the best way to upgrade it or install vim on Solaris?

cwd
  • 44,479
  • 71
  • 146
  • 167

6 Answers6

35

According to http://www.vim.org/download.php, Sun Solaris Vim is included in the Companion Software: http://wwws.sun.com/software/solaris/freeware/.

vi has had the :ve[rsion] command going back at least as far as 1979, so it should work on any Solaris release.

MetaEd
  • 1,412
  • 10
  • 8
  • 2
    `:ve` did exist in the very first vi version already, released on January 1st, 1978. See https://github.com/n-t-roff/ex-1.1 for the source code the original documentation. – user3224237 Aug 12 '16 at 19:48
16

The command to show the version is

:version

which can be abbreviated to

:ve
Keith Thompson
  • 21,782
  • 6
  • 48
  • 55
4

You should try to find the vi version with the package manager:

pkginfo | grep -i vi 

or:

pkginfo '*vi*'
Michael Mrozek
  • 91,316
  • 38
  • 238
  • 232
fromnaboo
  • 6,702
  • 2
  • 22
  • 13
2

You can simply open the editor by typing

vi

This will open the default page that shows the version number.

seqmo
  • 21
  • 1
0
vi --version 

should do this job :)

Rainer Bendig
  • 4,056
  • 1
  • 17
  • 9
  • Please someone explaining what's wrong with this answer. Thanks. – Paolo Oct 27 '11 at 18:25
  • 3
    On Solaris 9, `vi --version` prints `vi: illegal option -- -`. `vim` recognizes the `--version` option; other `vi` implementations, including `nvi`, do not. – Keith Thompson Jan 22 '12 at 23:10
  • Also this answer does not address the other part of the question: upgrading or installing Vim on Solaris. – MetaEd Jun 26 '12 at 15:56
0

On Solaris 11 and later releases, vim is now the default version of vi.

alanc
  • 2,996
  • 16
  • 27