2

I'm working in a old environment, installing VIM is not an option and neither other similar packages. My only editor available is the old school VI, version 3.10. So, I wanted to ask you guys, do you folks think there is a way for me to set syntax color on it? (Like, e.g., adding source code from :syntax on to the .exrc file)

1
  • 1
    Welcome to Vi and Vim! As I understand, POSIX vi has no syntax highlighting. Version 5 of Vim was the first Vim version to (officially) introduce syntax highlighting.
    – D. Ben Knoble
    Commented Jul 12, 2022 at 17:17

1 Answer 1

5

"old school VI" version 3.10 sounds like AIX (good luck on finding "vim 3.10").

For the record, I see these reported by AIX (for the ":ve" command):

Version 3.10

HPUX 11.23:

HP Version $ B.11.23  Dec  2 2004 03:59:23 $  

Solaris 10:

Version SVR4.0, Solaris 2.5.0

AIX vi (like all of the other "old school VI") predates POSIX vi, and none of those supported color syntax highlighting. You can see what options are runtime-configurable using ":set all". For AIX:

:set all
noautoindent            mesg                            noshowmode
autoprint               nomodeline                      noslowopen
noautowrite             nonumber                        tabstop=8
nobeautify              nonovice                        taglength=0
closepunct='".,;)]}     nooptimize                      tags=tags /usr/lib/tags
directory=/var/tmp      paragraphs=IPLPPPQPP LIpplpipbp backtag
noedcompatible          partialcharacter=-              term=vt100
noerrorbells            prompt                          noterse
noexrc                  noreadonly                      timeout
flash                   redraw                          ttytype=vt100
hardtabs=8              remap                           warn
history=32              report=5                        window=39
noignorecase            scroll=19                       wrapscan
linelimit=1048560       sections=NHSHH HUuhsh+c         wrapmargin=0
nolisp                  shell=/opt/fsw/bin/zsh          nowriteany
nolist                  shiftwidth=8                    wraptype=word
magic                   noshowmatch

There's no "color" or "syntax" there.

SVr4 came in late 1988 (and subsequent releases through the early 1990s).

The first *nix-based vi's which could do color highlighting began with Elvis in 1994, followed by vile in 1995 and vim in 1998 (see FAQ). More general syntax highlighting followed in each case about a year later.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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