Quick intro to elvis 2.1, with links to source code and binaries

CONTENTS
  • 1. About this file
  • 2. Differences between vi and elvis 2.1
  • 3. Differences between 2.0 and 2.1
  • 3.1 New ex commands
  • 3.2 New options commands
  • 3.3 New functions
  • 3.4 New ports and GUI features
  • 3.5 Miscellany
  • 3.6 Differences between 2.1_3 and the original 2.1 release
  • 3.7 Differences between 2.1_4 and 2.1_3
  • 4. The future of elvis
  • 5. Links to related files
  • .---------------------------------------------------------------.
    | This is not elvis' user manual!  The real documentation for   |
    | elvis is located in its online help facility.  While running  |
    | elvis, enter the command ":help" to see the table of contents.|
    ^---------------------------------------------------------------^
    
    

    1. About this file

    This file is written in the HTML markup language. You can view it with any WWW viewer, such as Netscape. You can also use elvis 2.1 to view it; this version of elvis has the ability to view HTML documents, and print them.

    This file has many hypertext links. Use them! If you're using elvis 2.1 to browse this file, then hypertextual references will appear as underlined text. (Except on color PCs; since color video cards don't support underlining, hypertextual references will be colored -- white on red, by default.) To follow the hypertext link, move the cursor onto the underlined text and press (Enter). To go back, press (Control-T). The (Tab) key moves the cursor forward to the next hypertext reference.

    If elvis 2.1 doesn't automatically start up in HTML mode when you view this file, then you'll need to force it into HTML mode by giving the command ":display html".

    2. Differences between vi and elvis 2.1

    Elvis is a superset of vi. It runs on more operating systems than vi, it is free, and you can obtain the source code. Elvis also has many new features. These new features are described in the first chapter of the online manual, which hypertext links to the other parts of the manual where those features are described in detail. Here's a just brief list:

    3. Differences between 2.0 and 2.1

    The following is a summary of changes made since the release of elvis 2.0. These are in addition to bug changes.

    3.1 New ex commands

    :only
    This closes all windows except the current window.
    	:only
    
    :browse
    :sbrowse
    These build a list of all tags which match given criteria (e.g., all tags in a particular file), and make an HTML document with links to all the definition points in your source code. The :browse command saves the cursor position on the stack and then displays the table in the current window. The :sbrowse command creates a new window showing that table.
    	:browse foo.c
    	:sbrowse class:/Ball
    
    :bbrowse
    :sbbrowse
    These build an HTML document with links to all the edit buffers. The :bbrowse command saves the cursor position on the stack and then displays the table in the current window. The :sbbrowse command creates a new window showing that table.
    	:bbrowse
    
    :alias
    :unalias
    The :alias command creates an alias -- a new ex command which you can implement via a series of existing ex commands. Aliases can accept arguments, and perform complex operations. Many sample aliases are included in the distribution.
    	:alias lower !% s/.*/\L&/
    
    :message
    :warning
    :error
    These output messages of various types. In particular, the :error message type has the side-effect of aborting any pending macros or aliases.
    	:if !< == !>
    	:then error Address range required
    
    :local
    This is handy in aliases. It is like :set, except that the options will be restored to their previous value when the alias exits.
    	:alias total {
    		"Sum the integers in a range of lines
    		local t=0 report=0 nosaveregexp
    		!% s/[0-9]\+/let t=t+\1/x
    		eval !% c (t)
    	}
    
    :try
    This executes a command, and then checks the success/failure indicator returned by that command. The then/else flag is set accordingly. Regardless of whether the command succeeded or not, :try itself always succeeds; this is significant because when a command fails (anywhere except as the argument of a :try command), any pending macros or aliases are aborted.
    	:alias togglecase {
    		try !% s/.*[a-z].*/\U&
    		else !% s/.*/\L&
    	}
    
    :while
    :do
    This executes a command in a loop, as long as a given condition holds true.
    	:let i = 1
    	:while i <= 10
    	:do {
    		calc i
    		let i = i + 1
    	}
    
    :switch
    :case
    :default
    This is a multi-way branch. The :switch command evaluates an expression, and stores the result in an internal variable. Each :case command compares the switch value to a literal string; if it matches then the remainder of the line is executed an an ex command. If none of the cases match, then :default will run its ex command.
    	:switch os
    	:case unix echo LF
    	:case mac echo CR
    	:default echo CR-LF
    

    3.2 Options

    Many new options have been added. Some exist only in a particular user interface, though. These are all described below.
    bufid, bufferid
    Each user buffer is automatically assigned a numeric identifier, which is stored in this option. These can be used later as a shorthand for either the buffer's filename or buffername.
    	:e #1
    	:1,20 copy (1)$
    
    locked, lock
    When set, this option prevents any changes from being made to the buffer. This is a slightly stronger version of the "readonly" option.
    readeol, reol
    writeeol, weol
    Together, these two options replace the old "binary" option. readeol can be set to one of dos, unix, mac, text, or binary to indicate the newline translations that were used to read a file into a buffer. The writeeol option can be set to any of those values, or the special value same to use the same translation as each buffer was read with.
    partiallastline, pll
    Traditionally, when vi is invoked on a file which doesn't end with a newline, vi adds one. Elvis does that too now, but since elvis can also be used on binary files it needs to remember whether it has added a newline, so it can omit that bogus newline when doing a binary write. That's what this option is for.
    putstyle, ps
    This is only meaningful for cut buffers, not normal edit buffers. It indicates whether the cut buffer's contents should be pasted as a series of characters, as a rectangular block, or as whole lines. (Previously this information was stored in the first line of a cut buffer, but that made cut buffers hard to edit.)
    matchchar, mc
    The visual % command has been extended to match any pairs of characers. This option stores the list of character pairs.
    completebinary, cob
    Elvis performs file name completion -- you can type a partial file name and hit <Tab> to have elvis complete the name for you (or as much of the name as possible before ambiguities are encountered). Normally new fe/a>
  • 3.2 New options commands
  • 3.3 New functions
  • 3.4 New ports and GUI features
  • 3.5 Miscellany
  • 3.6 Differences between 2.1_3 and the original 2.1 release
  • 3.7 Differences between 2.1_4 and 2.1_3
  • 4. The future of elvis
  • 5. Links to related files
    .---------------------------------------------------------------.
    | This is not elvis' user manual!  The real documentation for   |
    | elvis is located in its online help facility.  While running  |
    | elvis, enter the command ":help" to see the table of contents.|
    ^---------------------------------------------------------------^
    
    

    1. About this file

    This file is written in the HTML markup language. You can view it with any WWW viewer, such as Netscape. You can also use elvis 2.1 to view it; this version of elvis has the ability to view HTML documents, and print them.

    This file has many hypertext links. Use them! If you're using elvis 2.1 to browse this file, then hypertextual references will appear as underlined text. (Except on color PCs; since color video cards don't support underlining, hypertextual references will be colored -- white on red, by default.) To follow the hypertext link, move the cursor onto the underlined text and press (Enter). To go back, press (Control-T). The (Tab) key moves the cursor forward to the next hypertext reference.

    If elvis 2.1 doesn't automatically start up in HTML mode when you view this file, then you'll need to force it into HTML mode by giving the command ":display html".

    2. Differences between vi and elvis 2.1

    Elvis is a superset of vi. It runs on more operating systems than vi, it is free, and you can obtain the source code. Elvis also has many new features. These new features are described in the first chapter of the online manual, which hypertext links to the other parts of the manual where those features are described in detail. Here's a just brief list:

    • Multiple edit buffers, so you can edit several files at once.
    • Multiple windows, so you can see multiple edit buffers, or different parts of the same edit buffer.
    • Multiple user interfaces, including graphical interfaces under Windows95/98/NT and X11.
    • A variety of display modes, including syntax coloring and HTML.
    • Online help, with hypertext links.
    • Enhanced tags, to support overloading in C++.
    • Network support, so you can load/save files via FTP, or even use elvis as a light-weight Web browser.
    • Aliases, which allow you to define new ex commands.
    • Built-in calculator

    3. Differences between 2.0 and 2.1

    The following is a summary of changes made since the release of elvis 2.0. These are in addition to bug changes.

    3.1 New ex commands

    :only
    This closes all windows except the current window.
    	:only
    
    :browse
    :sbrowse
    These build a list of all tags which match given criteria (e.g., all tags in a particular file), and make an HTML document with links to all the definition points in your source code. The :browse command saves the cursor position on the stack and then displays the table in the current window. The :sbrowse command creates a new window showing that table.
    	:browse foo.c
    	:sbrowse class:/Ball
    
    :bbrowse
    :sbbrowse
    These build an HTML document with links to all the edit buffers. The :bbrowse command saves the cursor position on the stack and then displays the table in the current window. The :sbbrowse command creates a new window showing that table.
    	:bbrowse
    
    :alias
    :unalias
    The :alias command creates an alias -- a new ex command which you can implement via a series of existing ex commands. Aliases can accept arguments, and perform complex operations. Many sample aliases are included in the distribution.
    	:alias lower !% s/.*/\L&/
    
    :message
    :warning
    :error
    These output messages of various types. In particular, the :error message type has the side-effect of aborting any pending macros or aliases.
    	:if !< == !>
    	:then error Address range required
    
    :local
    This is handy in aliases. It is like :set, except that the options will be restored to their previous value when the alias exits.
    	:alias total {
    		"Sum the integers in a range of lines
    		local t=0 report=0 nosaveregexp
    		!% s/[0-9]\+/let t=t+\1/x
    		eval !% c (t)
    	}
    
    :try
    This executes a command, and then checks the success/failure indicator returned by that command. The then/else flag is set accordingly. Regardless of whether the command succeeded or not, :try itself always succeeds; this is significant because when a command fails (anywhere except as the argument of a :try command), any pending macros or aliases are aborted.
    	:alias togglecase {
    		try !% s/.*[a-z].*/\U&
    		else !% s/.*/\L&
    	}
    
    :while
    :do
    This executes a command in a loop, as long as a given condition holds true.
    	:let i = 1
    	:while i <= 10
    	:do {
    		calc i
    		let i = i + 1
    	}
    
    :switch
    :case
    :default
    This is a multi-way branch. The :switch command evaluates an expression, and stores the result in an internal variable. Each :case command compares the switch value to a literal string; if it matches then the remainder of the line is executed an an ex command. If none of the cases match, then :default will run its ex command.
    	:switch os
    	:case unix echo LF
    	:case mac echo CR
    	:default echo CR-LF
    

    3.2 Options

    Many new options have been added. Some exist only in a particular user interface, though. These are all described below.
    bufid, bufferid
    Each user buffer is automatically assigned a numeric identifier, which is stored in this option. These can be used later as a shorthand for either the buffer's filename or buffername.
    	:e #1
    	:1,20 copy (1)$
    
    locked, lock
    When set, this option prevents any changes from being made to the buffer. This is a slightly stronger version of the "readonly" option.
    readeol, reol
    writeeol, weol
    Together, these two options replace the old "binary" option. readeol can be set to one of dos, unix, mac, text, or binary to indicate the newline translations that were used to read a file into a buffer. The writeeol option can be set to any of those values, or the special value same to use the same translation as each buffer was read with.
    partiallastline, pll
    Traditionally, when vi is invoked on a file which doesn't end with a newline, vi adds one. Elvis does that too now, but since elvis can also be used on binary files it needs to remember whether it has added a newline, so it can omit that bogus newline when doing a binary write. That's what this option is for.
    putstyle, ps
    This is only meaningful for cut buffers, not normal edit buffers. It indicates whether the cut buffer's contents should be pasted as a series of characters, as a rectangular block, or as whole lines. (Previously this information was stored in the first line of a cut buffer, but that made cut buffers hard to edit.)
    matchchar, mc
    The visual % command has been extended to match any pairs of characers. This option stores the list of character pairs.
    completebinary, cob
    Elvis performs file name completion -- you can type a partial file name and hit <Tab> to have elvis complete the name for you (or as much of the name as possible before ambiguities are encountered). Normally new fe/a>
  • 3.2 New options commands
  • 3.3 New functions
  • 3.4 New ports and GUI features
  • 3.5 Miscellany
  • 3.6 Differences between 2.1_3 and the original 2.1 release
  • 3.7 Differences between 2.1_4 and 2.1_3
  • 4. The future of elvis
  • 5. Links to related files
    .---------------------------------------------------------------.
    | This is not elvis' user manual!  The real documentation for   |
    | elvis is located in its online help facility.  While running  |
    | elvis, enter the command ":help" to see the table of contents.|
    ^---------------------------------------------------------------^
    
    

    1. About this file

    This file is written in the HTML markup language. You can view it with any WWW viewer, such as Netscape. You can also use elvis 2.1 to view it; this version of elvis has the ability to view HTML documents, and print them.

    This file has many hypertext links. Use them! If you're using elvis 2.1 to browse this file, then hypertextual references will appear as underlined text. (Except on color PCs; since color video cards don't support underlining, hypertextual references will be colored -- white on red, by default.) To follow the hypertext link, move the cursor onto the underlined text and press (Enter). To go back, press (Control-T). The (Tab) key moves the cursor forward to the next hypertext reference.

    If elvis 2.1 doesn't automatically start up in HTML mode when you view this file, then you'll need to force it into HTML mode by giving the command ":display html".

    2. Differences between vi and elvis 2.1

    Elvis is a superset of vi. It runs on more operating systems than vi, it is free, and you can obtain the source code. Elvis also has many new features. These new features are described in the first chapter of the online manual, which hypertext links to the other parts of the manual where those features are described in detail. Here's a just brief list:

    • Multiple edit buffers, so you can edit several files at once.
    • Multiple windows, so you can see multiple edit buffers, or different parts of the same edit buffer.
    • Multiple user interfaces, including graphical interfaces under Windows95/98/NT and X11.
    • A variety of display modes, including syntax coloring and HTML.
    • Online help, with hypertext links.
    • Enhanced tags, to support overloading in C++.
    • Network support, so you can load/save files via FTP, or even use elvis as a light-weight Web browser.
    • Aliases, which allow you to define new ex commands.
    • Built-in calculator

    3. Differences between 2.0 and 2.1

    The following is a summary of changes made since the release of elvis 2.0. These are in addition to bug changes.

    3.1 New ex commands

    :only
    This closes all windows except the current window.
    	:only
    
    :browse
    :sbrowse
    These build a list of all tags which match given criteria (e.g., all tags in a particular file), and make an HTML document with links to all the definition points in your source code. The :browse command saves the cursor position on the stack and then displays the table in the current window. The :sbrowse command creates a new window showing that table.
    	:browse foo.c
    	:sbrowse class:/Ball
    
    :bbrowse
    :sbbrowse
    These build an HTML document with links to all the edit buffers. The :bbrowse command saves the cursor position on the stack and then displays the table in the current window. The :sbbrowse command creates a new window showing that table.
    	:bbrowse
    
    :alias
    :unalias
    The :alias command creates an alias -- a new ex command which you can implement via a series of existing ex commands. Aliases can accept arguments, and perform complex operations. Many sample aliases are included in the distribution.
    	:alias lower !% s/.*/\L&/
    
    :message
    :warning
    :error
    These output messages of various types. In particular, the :error message type has the side-effect of aborting any pending macros or aliases.
    	:if !< == !>
    	:then error Address range required
    
    :local
    This is handy in aliases. It is like :set, except that the options will be restored to their previous value when the alias exits.
    	:alias total {
    		"Sum the integers in a range of lines
    		local t=0 report=0 nosaveregexp
    		!% s/[0-9]\+/let t=t+\1/x
    		eval !% c (t)
    	}
    
    :try
    This executes a command, and then checks the success/failure indicator returned by that command. The then/else flag is set accordingly. Regardless of whether the command succeeded or not, :try itself always succeeds; this is significant because when a command fails (anywhere except as the argument of a :try command), any pending macros or aliases are aborted.
    	:alias togglecase {
    		try !% s/.*[a-z].*/\U&
    		else !% s/.*/\L&
    	}
    
    :while
    :do
    This executes a command in a loop, as long as a given condition holds true.
    	:let i = 1
    	:while i <= 10
    	:do {
    		calc i
    		let i = i + 1
    	}
    
    :switch
    :case
    :default
    This is a multi-way branch. The :switch command evaluates an expression, and stores the result in an internal variable. Each :case command compares the switch value to a literal string; if it matches then the remainder of the line is executed an an ex command. If none of the cases match, then :default will run its ex command.
    	:switch os
    	:case unix echo LF
    	:case mac echo CR
    	:default echo CR-LF
    

    3.2 Options

    Many new options have been added. Some exist only in a particular user interface, though. These are all described below.
    bufid, bufferid
    Each user buffer is automatically assigned a numeric identifier, which is stored in this option. These can be used later as a shorthand for either the buffer's filename or buffername.
    	:e #1
    	:1,20 copy (1)$
    
    locked, lock
    When set, this option prevents any changes from being made to the buffer. This is a slightly stronger version of the "readonly" option.
    readeol, reol
    writeeol, weol
    Together, these two options replace the old "binary" option. readeol can be set to one of dos, unix, mac, text, or binary to indicate the newline translations that were used to read a file into a buffer. The writeeol option can be set to any of those values, or the special value same to use the same translation as each buffer was read with.
    partiallastline, pll
    Traditionally, when vi is invoked on a file which doesn't end with a newline, vi adds one. Elvis does that too now, but since elvis can also be used on binary files it needs to remember whether it has added a newline, so it can omit that bogus newline when doing a binary write. That's what this option is for.
    putstyle, ps
    This is only meaningful for cut buffers, not normal edit buffers. It indicates whether the cut buffer's contents should be pasted as a series of characters, as a rectangular block, or as whole lines. (Previously this information was stored in the first line of a cut buffer, but that made cut buffers hard to edit.)
    matchchar, mc
    The visual % command has been extended to match any pairs of characers. This option stores the list of character pairs.
    completebinary, cob
    Elvis performs file name completion -- you can type a partial file name and hit <Tab> to have elvis complete the name for you (or as much of the name as possible before ambiguities are encountered). Normally new fe/a>
  • 3.2 New options commands
  • 3.3 New functions
  • 3.4 New ports and GUI features
  • 3.5 Miscellany
  • 3.6 Differences between 2.1_3 and the original 2.1 release
  • 3.7 Differences between 2.1_4 and 2.1_3
  • 4. The future of elvis
  • 5. Links to related files
    .---------------------------------------------------------------.
    | This is not elvis' user manual!  The real documentation for   |
    | elvis is located in its online help facility.  While running  |
    | elvis, enter the command ":help" to see the table of contents.|
    ^---------------------------------------------------------------^
    
    

    1. About this file

    This file is written in the HTML markup language. You can view it with any WWW viewer, such as Netscape. You can also use elvis 2.1 to view it; this version of elvis has the ability to view HTML documents, and print them.

    This file has many hypertext links. Use them! If you're using elvis 2.1 to browse this file, then hypertextual references will appear as underlined text. (Except on color PCs; since color video cards don't support underlining, hypertextual references will be colored -- white on red, by default.) To follow the hypertext link, move the cursor onto the underlined text and press (Enter). To go back, press (Control-T). The (Tab) key moves the cursor forward to the next hypertext reference.

    If elvis 2.1 doesn't automatically start up in HTML mode when you view this file, then you'll need to force it into HTML mode by giving the command ":display html".

    2. Differences between vi and elvis 2.1

    Elvis is a superset of vi. It runs on more operating systems than vi, it is free, and you can obtain the source code. Elvis also has many new features. These new features are described in the first chapter of the online manual, which hypertext links to the other parts of the manual where those features are described in detail. Here's a just brief list:

    • Multiple edit buffers, so you can edit several files at once.
    • Multiple windows, so you can see multiple edit buffers, or different parts of the same edit buffer.
    • Multiple user interfaces, including graphical interfaces under Windows95/98/NT and X11.
    • A variety of display modes, including syntax coloring and HTML.
    • Online help, with hypertext links.
    • Enhanced tags, to support overloading in C++.
    • Network support, so you can load/save files via FTP, or even use elvis as a light-weight Web browser.
    • Aliases, which allow you to define new ex commands.
    • Built-in calculator

    3. Differences between 2.0 and 2.1

    The following is a summary of changes made since the release of elvis 2.0. These are in addition to bug changes.

    3.1 New ex commands

    :only
    This closes all windows except the current window.
    	:only
    
    :browse
    :sbrowse
    These build a list of all tags which match given criteria (e.g., all tags in a particular file), and make an HTML document with links to all the definition points in your source code. The :browse command saves the cursor position on the stack and then displays the table in the current window. The :sbrowse command creates a new window showing that table.
    	:browse foo.c
    	:sbrowse class:/Ball
    
    :bbrowse
    :sbbrowse
    These build an HTML document with links to all the edit buffers. The :bbrowse command saves the cursor position on the stack and then displays the table in the current window. The :sbbrowse command creates a new window showing that table.
    	:bbrowse
    
    :alias
    :unalias
    The :alias command creates an alias -- a new ex command which you can implement via a series of existing ex commands. Aliases can accept arguments, and perform complex operations. Many sample aliases are included in the distribution.
    	:alias lower !% s/.*/\L&/
    
    :message
    :warning
    :error
    These output messages of various types. In particular, the :error message type has the side-effect of aborting any pending macros or aliases.
    	:if !< == !>
    	:then error Address range required
    
    :local
    This is handy in aliases. It is like :set, except that the options will be restored to their previous value when the alias exits.
    	:alias total {
    		"Sum the integers in a range of lines
    		local t=0 report=0 nosaveregexp
    		!% s/[0-9]\+/let t=t+\1/x
    		eval !% c (t)
    	}
    
    :try
    This executes a command, and then checks the success/failure indicator returned by that command. The then/else flag is set accordingly. Regardless of whether the command succeeded or not, :try itself always succeeds; this is significant because when a command fails (anywhere except as the argument of a :try command), any pending macros or aliases are aborted.
    	:alias togglecase {
    		try !% s/.*[a-z].*/\U&
    		else !% s/.*/\L&
    	}
    
    :while
    :do
    This executes a command in a loop, as long as a given condition holds true.
    	:let i = 1
    	:while i <= 10
    	:do {
    		calc i
    		let i = i + 1
    	}
    
    :switch
    :case
    :default
    This is a multi-way branch. The :switch command evaluates an expression, and stores the result in an internal variable. Each :case command compares the switch value to a literal string; if it matches then the remainder of the line is executed an an ex command. If none of the cases match, then :default will run its ex command.
    	:switch os
    	:case unix echo LF
    	:case mac echo CR
    	:default echo CR-LF
    

    3.2 Options

    Many new options have been added. Some exist only in a particular user interface, though. These are all described below.
    bufid, bufferid
    Each user buffer is automatically assigned a numeric identifier, which is stored in this option. These can be used later as a shorthand for either the buffer's filename or buffername.
    	:e #1
    	:1,20 copy (1)$
    
    locked, lock
    When set, this option prevents any changes from being made to the buffer. This is a slightly stronger version of the "readonly" option.
    readeol, reol
    writeeol, weol
    Together, these two options replace the old "binary" option. readeol can be set to one of dos, unix, mac, text, or binary to indicate the newline translations that were used to read a file into a buffer. The writeeol option can be set to any of those values, or the special value same to use the same translation as each buffer was read with.
    partiallastline, pll
    Traditionally, when vi is invoked on a file which doesn't end with a newline, vi adds one. Elvis does that too now, but since elvis can also be used on binary files it needs to remember whether it has added a newline, so it can omit that bogus newline when doing a binary write. That's what this option is for.
    putstyle, ps
    This is only meaningful for cut buffers, not normal edit buffers. It indicates whether the cut buffer's contents should be pasted as a series of characters, as a rectangular block, or as whole lines. (Previously this information was stored in the first line of a cut buffer, but that made cut buffers hard to edit.)
    matchchar, mc
    The visual % command has been extended to match any pairs of characers. This option stores the list of character pairs.
    completebinary, cob
    Elvis performs file name completion -- you can type a partial file name and hit <Tab> to have elvis complete the name for you (or as much of the name as possible before ambiguities are encountered). Normally new fe/a>
  • 3.2 New options commands
  • 3.3 New functions
  • 3.4 New ports and GUI features
  • 3.5 Miscellany
  • 3.6 Differences between 2.1_3 and the original 2.1 release
  • 3.7 Differences between 2.1_4 and 2.1_3
  • 4. The future of elvis
  • 5. Links to related files
    .---------------------------------------------------------------.
    | This is not elvis' user manual!  The real documentation for   |
    | elvis is located in its online help facility.  While running  |
    | elvis, enter the command ":help" to see the table of contents.|
    ^---------------------------------------------------------------^
    
    

    1. About this file

    This file is written in the HTML markup language. You can view it with any WWW viewer, such as Netscape. You can also use elvis 2.1 to view it; this version of elvis has the ability to view HTML documents, and print them.

    This file has many hypertext links. Use them! If you're using elvis 2.1 to browse this file, then hypertextual references will appear as underlined text. (Except on color PCs; since color video cards don't support underlining, hypertextual references will be colored -- white on red, by default.) To follow the hypertext link, move the cursor onto the underlined text and press (Enter). To go back, press (Control-T). The (Tab) key moves the cursor forward to the next hypertext reference.

    If elvis 2.1 doesn't automatically start up in HTML mode when you view this file, then you'll need to force it into HTML mode by giving the command ":display html".

    2. Differences between vi and elvis 2.1

    Elvis is a superset of vi. It runs on more operating systems than vi, it is free, and you can obtain the source code. Elvis also has many new features. These new features are described in the first chapter of the online manual, which hypertext links to the other parts of the manual where those features are described in detail. Here's a just brief list:

    • Multiple edit buffers, so you can edit several files at once.
    • Multiple windows, so you can see multiple edit buffers, or different parts of the same edit buffer.
    • Multiple user interfaces, including graphical interfaces under Windows95/98/NT and X11.
    • A variety of display modes, including syntax coloring and HTML.
    • Online help, with hypertext links.
    • Enhanced tags, to support overloading in C++.
    • Network support, so you can load/save files via FTP, or even use elvis as a light-weight Web browser.
    • Aliases, which allow you to define new ex commands.
    • Built-in calculator

    3. Differences between 2.0 and 2.1

    The following is a summary of changes made since the release of elvis 2.0. These are in addition to bug changes.

    3.1 New ex commands

    :only
    This closes all windows except the current window.
    	:only
    
    :browse
    :sbrowse
    These build a list of all tags which match given criteria (e.g., all tags in a particular file), and make an HTML document with links to all the definition points in your source code. The :browse command saves the cursor position on the stack and then displays the table in the current window. The :sbrowse command creates a new window showing that table.
    	:browse foo.c
    	:sbrowse class:/Ball
    
    :bbrowse
    :sbbrowse
    These build an HTML document with links to all the edit buffers. The :bbrowse command saves the cursor position on the stack and then displays the table in the current window. The :sbbrowse command creates a new window showing that table.
    	:bbrowse
    
    :alias
    :unalias
    The :alias command creates an alias -- a new ex command which you can implement via a series of existing ex commands. Aliases can accept arguments, and perform complex operations. Many sample aliases are included in the distribution.
    	:alias lower !% s/.*/\L&/
    
    :message
    :warning
    :error
    These output messages of various types. In particular, the :error message type has the side-effect of aborting any pending macros or aliases.
    	:if !< == !>
    	:then error Address range required
    
    :local
    This is handy in aliases. It is like :set, except that the options will be restored to their previous value when the alias exits.
    	:alias total {
    		"Sum the integers in a range of lines
    		local t=0 report=0 nosaveregexp
    		!% s/[0-9]\+/let t=t+\1/x
    		eval !% c (t)
    	}
    
    :try
    This executes a command, and then checks the success/failure indicator returned by that command. The then/else flag is set accordingly. Regardless of whether the command succeeded or not, :try itself always succeeds; this is significant because when a command fails (anywhere except as the argument of a :try command), any pending macros or aliases are aborted.
    	:alias togglecase {
    		try !% s/.*[a-z].*/\U&
    		else !% s/.*/\L&
    	}
    
    :while
    :do
    This executes a command in a loop, as long as a given condition holds true.
    	:let i = 1
    	:while i <= 10
    	:do {
    		calc i
    		let i = i + 1
    	}
    
    :switch
    :case
    :default
    This is a multi-way branch. The :switch command evaluates an expression, and stores the result in an internal variable. Each :case command compares the switch value to a literal string; if it matches then the remainder of the line is executed an an ex command. If none of the cases match, then :default will run its ex command.
    	:switch os
    	:case unix echo LF
    	:case mac echo CR
    	:default echo CR-LF
    

    3.2 Options

    Many new options have been added. Some exist only in a particular user interface, though. These are all described below.
    bufid, bufferid
    Each user buffer is automatically assigned a numeric identifier, which is stored in this option. These can be used later as a shorthand for either the buffer's filename or buffername.
    	:e #1
    	:1,20 copy (1)$
    
    locked, lock
    When set, this option prevents any changes from being made to the buffer. This is a slightly stronger version of the "readonly" option.
    readeol, reol
    writeeol, weol
    Together, these two options replace the old "binary" option. readeol can be set to one of dos, unix, mac, text, or binary to indicate the newline translations that were used to read a file into a buffer. The writeeol option can be set to any of those values, or the special value same to use the same translation as each buffer was read with.
    partiallastline, pll
    Traditionally, when vi is invoked on a file which doesn't end with a newline, vi adds one. Elvis does that too now, but since elvis can also be used on binary files it needs to remember whether it has added a newline, so it can omit that bogus newline when doing a binary write. That's what this option is for.
    putstyle, ps
    This is only meaningful for cut buffers, not normal edit buffers. It indicates whether the cu