Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
add comment

5 Answers

up vote 6 down vote accepted

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.

share|improve this answer
add comment

The command to show the version is

:version

which can be abbreviated to

:ve
share|improve this answer
add comment

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

pkginfo | grep -i vi 

or:

pkginfo '*vi*'
share|improve this answer
1  
And for Solaris 11, pkg list vim –  bahamat Aug 4 '12 at 21:16
add comment

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

share|improve this answer
add comment
vi --version 

should do this job :)

share|improve this answer
    
Please someone explaining what's wrong with this answer. Thanks. –  Guandalino Oct 27 '11 at 18:25
    
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. –  MετάEd Jun 26 '12 at 15:56
add comment

Your Answer

 
discard

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.