TA # Date Created Date Updated   Printer Friendly Version of This TA   Print Article
  E-mail This TA   E-mail Article
103472 01/08/1992 01:12 PM 05/04/2001 01:46 PM
Text editor vi and its limitations.
vi text editor line length file size program limitations maximum unix xenix
SCO UNIX System V/386 Release 3.2 Operating System
SCO XENIX Operating System Release 2.2 and 2.3

          What are the limitations of the vi text editor?

          The vi editor provides a powerful, (V)isually (I)nteractive text
          editor that provides a continuously updated text display as editing
          progresses.  However, vi imposes several limits that must be
          considered when the user departs from the range of typical

          The commands and other conditions that these limits affect are
          described below. Although these limits rarely affect most users,
          they are grouped here for your convenience should you need to
          know what they are.

          FILE TYPES:
                vi can only be used to edit text files, not binary files
                (such as complied programs) or directories.

                vi allows line lengths up to 1024 characters, including a
                small number of characters (about 2 or 3) used for overhead.
                In general, unless your line lengths exceed 1024 characters,
                you should not have difficulty.

                If you load in a text file with lines longer than the
                maximum allowed, they will be truncated to the maximum.
                Be careful not to store such an editor file away if the
                information was important; all the additional text will be

                On some UNIX systems, memory constraints may limit maximum
                file size. However, generally the system capacity is such
                that the file size is rarely, if ever, of concern since the
                silently enforced maximum file length is 250,000 lines.

                vi copies the source file being edited into a separate
                buffer area (temporary storage location) during the editing

                Other limitations you are likely to encounter as you reach
                more advanced levels include:

                * 256 characters per global command list
                * 14 characters in a filename in vi. (Berkeley 4.x-based
                  UNIX systems usually support longer filenames up to 256
                * 128 characters in the previous insert/delete buffer
                * 100 characters in a shell escape command
                * 63 characters in a string-valued option (:set command)

          For more information, refer to the vi(c) in the SCO UNIX
          System V/386 or SCO XENIX System V User's Reference manual.

Related Articles
•  How many terminal symbols can be used with yacc(CP)?
•  What is the function of the config.fx file?
•  Factors to consider when linking other languages with LPI-BASIC.
•  Books on Shell: An Annotated Guide
•  Example batch file transfer scripts for SCO uniPATH SNA-3270