File:NetBSD_6.1_vi_C_Hello_World.png · Wikimedia Commons · See Wikimedia Commons
via Wikipedia infobox
This utility shall be provided on systems that both support the User Portability Utilities option and define the POSIX2 CHAR TERM symbol. On other systems it is optional. This reference page uses the term edit buffer to describe the current working text. No specific implementation is implied by this term. All editing changes are performed on the edit buffer, and no changes to it shall affect any file until an editor command writes the file. When using vi , the terminal screen acts as a window into the editing buffer. Changes made to the editing buffer shall be reflected in the screen display; the position of the cursor on the screen shall indicate the position within the editing buffer. Certain terminals do not have all the capabilities necessary to support the complete vi definition. When these commands cannot be supported on such terminals, this condition shall not produce an error message such as "not an editor command" or report a syntax error. The implementation may either accept the commands and produce results on the screen that are the result of an unsuccessful attempt to meet the requirements of this volume of POSIX.1-2017 or report an error describing the terminal-related deficiency. See the ENVIRONMENT VARIABLES section of the ex command for the environment variables that affect the execution of the vi command. See the ASYNCHRONOUS EVENTS section of the ex for the asynchronous events that affect the execution of the vi command. Standard output may be used for writing prompts to the user, for informational messages, and for writing lines from the file. The following symbols are used in this reference page to represent arguments to commands. Commands that take motion arguments operate on either lines or characters, depending on the circumstances. When operating on lines, all lines that fall partially or wholly within the text region specified for the command shall be affected. When operating on characters, only the exact characters in the specified text region shall be affected. Each motion command specifies this individually. When commands that may be motion commands are not used as motion commands, they shall set the current position to the current line and column as specified. The point located between the last non- (if any) and the terminating of a line. For an empty line, this location coincides with the beginning of the line. The location corresponding to the end of the last line in the edit buffer. In the remainder of the description of the vi utility, the term "buffer line" refers to a line in the edit buffer and the term "display line" refers to the line or lines on the display screen used to display one buffer line. The term "current line" refers to a specific "buffer line". If any command is executed that overwrites a portion of the screen other than the last line of the screen (for example, the ex suspend or ! commands), other than the ex shell command, the user shall be prompted for a character before the screen is refreshed and the edit session continued. characters shall take up the number of columns on the screen set by the tabstop edit option (see ex ), unless there are less than that number of columns before the display margin that will cause the displayed line to be folded; in this case, they shall only take up the number of columns up to that boundary. The cursor shall be placed on the current line and relative to the current column as specified by each command described in the following sections. In visual mode, if a line from the edit buffer (other than the current line) does not entirely fit into the lines at the bottom of the display that are available for its presentation, the editor may choose not to display any portion of the line. The lines of the display that do not contain text from the edit buffer for this reason shall each consist of a single '@' character. In visual mode, the editor may choose for unspecified reasons to not update lines in the display to correspond to
~19 min read
vi (pronounced as two letters, /ˌviːˈaɪ/ ) is a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs, is standardized by the Single Unix Specification and POSIX.
vi is actually a mode of the earlier ex editor. Originally, ex lacked a full-screen editing capability, but in 1976, Bill Joy enhanced it to support a visual mode. The program was updated to start in visual mode when launched with the command vi instead of the legacy mode when launched via the ex command. In this way, ex and vi are the same program, not two programs. Joy's ex 1.1 was released as part of the first Berkeley Software Distribution (BSD) Unix release in March 1978. It was not until version 2.0 of ex, released as part of Second BSD in May 1979 that the editor was installed under the name "vi" which took a user straight into ex's visual mode.
Excerpt from a page describing this subject · 40,000 chars · not written by Vinony
via Wikidata · CC0
via Wikidata sitelinks · CC0
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).