AskDefine | Define vi

Dictionary Definition

vi adj : denoting a quantity consisting of six items or units [syn: six, 6, half dozen, half a dozen]

Noun

1 the cardinal number that is the sum of five and one [syn: six, 6, sixer, sise, Captain Hicks, half a dozen, sextet, sestet, sextuplet, hexad]
2 more than 130 southeastern Virgin Islands; a dependent territory of the United States [syn: United States Virgin Islands, American Virgin Islands]

User Contributed Dictionary

Translingual

Cardinal number

VI or vi
  1. Roman numeral for six.

English

Proper noun

  1. The primary text based editor for Unix.

Bosnian

Pronoun

  1. you (second-person plural)

Noun

vi

Noun

vi

Croatian

Pronoun

  1. you (plural)

Declension

Danish

Pronoun

vi

Esperanto

Pronoun

vi (accusative vin)
  1. (second-person personal singular or plural pronoun): you, thou (archaic, singular)

Related terms

See also

Ewe

Pronunciation

  • /viː/
  • /vi:/

Adjective

vi

Noun

vi
  1. child (A son or daughter).
  2. descendant

Italian

Pronoun

vi
  1. (second-person personal plural object pronoun): you, to you
    (noi) vi amiamo - we love you
  2. (second-person reflexive plural): yourselves
    (voi) vi ricordate

See also

Lojban

Cmavo

vi

Related terms

Norwegian

Verb

  1. Form of imperative, vie

Portuguese

Verb

vi
  1. first person singular preterite indicative of ver; "I saw"

Romanian

Pronoun

vi (dative form of voi; form of )
  1. to you

Usage notes

This word is used when vă (which is dative) is combined with the following accusatives:
  • îl (the accusative of el, contracted as vi-l)
  • îi (the accusative of ei, contracted as vi-i)
  • le (the accusative of ele)
  • se (the reflexive accusative of all third-person pronouns)

See also

Serbian

Pronoun

  1. you (second-person plural)

Slovene

Pronoun

vi
  1. you (plural), also formal you

Spanish

Verb

es-verb-form ver

Swedish

Pronunciation

Pronoun

vi
  1. we (first-person personal plural subject pronoun'')

Extensive Definition

vi is a screen-oriented text editor written by Bill Joy in 1976 for an early BSD release.
The name vi is derived from the shortest unambiguous abbreviation for the command visual in ex; the command in question switches the line editor ex to visual mode. The name vi is , or /vaɪ/.
Current releases of vi are free and open source software, usually released under permissive free software licenses such as the BSD License.

Interface

vi is a modal editor: it operates in either insert mode (where typed text becomes part of the document) or normal mode (where keystrokes are interpreted as commands that control the edit session). Typing 'i' while in normal mode switches the editor to insert mode. Typing 'i' again at this point places an 'i' character in the document. How the 'i' keystroke is processed depends on the editor mode. (From insert mode, pressing the escape key switches the editor back to normal mode.)
vi can process compound commands that embed text for insertion in the document. For example, the command:
20iHello world!
would insert 20 lines in the document with the text 'Hello world!'. Rather than grapple with the notion of two mode switches while executing this command, some users view vi as a stateful filter. After processing the third character, vi changes state and begins processing input as text to be added to the file. On processing the escape, vi returns to the state in which it is ready to receive a new command.
Whether viewed as modal or stateful, vi's processing of the same keystroke in different ways depending on the history of the edit session distinguishes it from editors which are generally considered non-modal.
A perceived advantage of a modal editor is that the use of keyboard chords (multiple keys pressed simultaneously, typically a modifier plus a letter key) is reduced or eliminated. Instead, in normal mode, single keystrokes serve as commands. This results in the user's hands not having to take up awkward positions, which some find results in faster work.

History

Bill Joy wrote vi at the University of California, Berkeley, on a Lear-Siegler ADM3A terminal. On this terminal, the Escape key was on the left, where the Tab key is now on the widely-used IBM PC keyboard, thus enabling users to very efficiently switch modes. Also, the keys h,j,k,l had arrows, explaining the usage of these keys for moving around. The ADM3A had no other keys that corresponded to arrows.
vi became the de facto standard Unix editor and a nearly undisputed hacker favorite outside of MIT until the rise of Emacs after about 1984. As of 2007 either vi or one of its clones can still be found on nearly all installations of Unix. The Single UNIX Specification specifies vi, so any system conforming to the Single UNIX Specification will have vi.
vi is still widely used by users of Unix variants. About half the respondents in a 1991 USENET poll preferred vi.

Operation

Upon start-up, vi starts in normal mode (unless instructed otherwise). Typing the letter 'i' (without quotes) enters insert mode. Any text typed thence gets added to the document, until the escape key is pressed, at which point the insert mode is exited and vi switches to normal mode. (There are few more commands that switch the editor into insert mode, but they differ only in where the new text will go - before the cursor, after the cursor, above current line, below current line, etc.).

Vi commands

There are two main classes of commands: cursor movements and text modification. Vi is the fullscreen counterpart to ex, and cursor movement is a key part of the design. These commands move the cursor, either relative to its current position, or to an absolute position.
Relative motions can be prefixed with a count, to tell vi to repeat the motion. These are relative motion commands:  
Absolute motions do not accept a count except for special cases where it acts as a line or column number. These are absolute motion commands: Many of the text modification commands form a special category known as operators. They can be prefixed with a count (to repeat the operator), and are suffixed with a motion command. The text between the current position and the final position (after the motion) is called a region.
These are examples of operators: " indents left all the lines from here until end of paragraph. ">/xxx" indents right lines from here until the line containing the pattern "xxx". |}
In some instances, if the motion command repeats the operator character (as in 'dd'), the region is a whole line. Thus "dd" deletes the current line, and "ccnew" replaces the entire current line with the text 'new'. Prefixing it with a count repeats (or makes it apply to more than one), e.g., "10dd" deletes 10 lines. A few commands move the cursor only within the current line. Like operators, they accept a repeat count: Other commands do not fall neatly into a category:

Regular expressions

Support for regular expressions (or text patterns) is an important feature of vi. These can be used extensively in search, substitution and global search and replace commands.

Ex commands

All of the ex commands can be used in vi by typing ":" to get a prompt, and entering the command. Exit temporarily (or permanently) from visual mode to ex by "Q", return to visual mode by ":vi". Several of vi's default behaviors can be altered using options. These take the form ":set option" or ":set nooption" and so on. Example: "set ignorecase" causes all searches to be case-insensitive. Where applicable, these commands take a line number or a range of line numbers. E.g., "10,25w newfile" will write lines 10 through 25 (inclusive) into the file newfile; "$r newfile" will read the contents of file newfile after the last line of the current document ('$' stands for the last line). A frequently used command sequence can be mapped to a new command-letter. The sequence could even include any text to be inserted. E.g.,:
map * iAuthor: John Bull
causes the '*' character to be a command that inserts "Author: John Bull" at the cursor position.
An abbreviation is like a mapping, but during insert mode. Example:
abbr US United States
This will insert "United States" whenever the word "US" is typed when in insert mode.

Derivatives and clones

  • nvi is an implementation of the ex/vi text editor originally distributed as part of the final official Berkeley Software Distribution(4.4BSD). This is the version of vi that is shipped with all BSD-based open source distributions. It adds command history and editing, filename completions, multiple edit buffers, multi-windowing (including multiple windows on the same edit buffer).
  • Vim "Vi IMproved" has yet more features than vi, including (scriptable) syntax highlighting, mouse support, graphical versions, visual mode and many new editing commands. It is the standard version of vi on most Linux systems.
  • Elvis is a free vi clone for Unix and other operating systems. This is the standard version of vi shipped on Slackware Linux and Kate OS.
  • vile was initially derived from an early version of Microemacs in an attempt to bring the Emacs multi-window/multi-buffer editing paradigm to vi users.
  • bvi "Binary VI" is an editor for binary files based on the vi text editor.
  • BusyBox, a set of standard Linux utilities on a single executable, includes a tiny vi clone.
  • Viper, an emacs package providing Vi emulation on top of Emacs.

See also

References

Further reading

vi in Arabic: في آي
vi in Bengali: ভিআই
vi in Czech: Vi
vi in German: Vi
vi in Spanish: Vi
vi in Persian: وی‌آی
vi in French: Vi
vi in Galician: Vi
vi in Korean: Vi
vi in Indonesian: Vi
vi in Italian: Vi (software)
vi in Latin: VI
vi in Dutch: Vi (Unix)
vi in Japanese: Vi
vi in Polish: Vi (program)
vi in Portuguese: Vi
vi in Russian: Vi
vi in Finnish: Vi
vi in Swedish: Vi (textredigerare)
vi in Thai: Vi
vi in Vietnamese: Vi
vi in Turkish: Vi
vi in Ukrainian: Vi
vi in Chinese: Vi
Privacy Policy, About Us, Terms and Conditions, Contact Us
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2
Material from Wikipedia, Wiktionary, Dict
Valid HTML 4.01 Strict, Valid CSS Level 2.1