vi is a family of screen-oriented text editors Text editors are often provided with operating systems or software development packages, and can be used to change configuration files and programming language source code which share certain characteristics, such as methods of invocation from the operating system command interpreter, and characteristic user interface features. The portable subset of the behavior of vi programs, and the ex The original ex was an advanced version of the standard Unix editor ed, included in the Berkeley Software Distribution. ex is similar to ed, with the exception that some switches and options are modified so that they are more user-friendly editor language supported within these programs, is described by (and thus standardized by) the Single Unix Specification The Single UNIX Specification is the collective name of a family of standards for computer operating systems to qualify for the name "Unix". The SUS is developed and maintained by the Austin Group, based on earlier work by the IEEE and The Open Group[1] and POSIX POSIX or "Portable Operating System Interface [for Unix]" is the name of a family of related standards specified by the IEEE to define the application programming interface (API), along with shell and utilities interfaces for software compatible with variants of the Unix operating system, although the standard can apply to any operating.
The original vi program was written by Bill Joy in 1976 for an early BSD Berkeley Software Distribution is the UNIX operating system derivative developed and distributed by the Computer Systems Research Group (CSRG) of the University of California, Berkeley, from 1977 to 1995 Unix Unix is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna. Today's Unix systems are split into various branches, developed over time by AT&T as well as various commercial vendors and non-profit release. Some current implementations of vi can trace their source code ancestry to Bill Joy; others are completely new, largely compatible reimplementations.
The name vi is derived from the shortest unambiguous abbreviation for the command visual in ex The original ex was an advanced version of the standard Unix editor ed, included in the Berkeley Software Distribution. ex is similar to ed, with the exception that some switches and options are modified so that they are more user-friendly; the command in question switches the line editor ex to visual mode. The name vi is pronounced /ˈviːˈaɪ/[2][3], or /vaɪ/[4], but never "six" as in the Roman numeral VI.[5]
In addition to various non-free Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with minimal restrictions only to ensure that further recipients can also do these things and that manufacturers of consumer- implementations of vi distributed with proprietary implementations of Unix, several free and open source software Free and open source software, also F/OSS, FOSS, or FLOSS is software that is liberally licensed to grant the right of users to use, study, change, and improve its design through the availability of its source code. This approach has gained both momentum and acceptance as the potential benefits have been increasingly recognized by both individuals implementations of vi exist. A 2009 survey of Linux Journal Linux Journal is a monthly technology magazine published by Belltown Media, Inc. of Houston, Texas. The magazine focuses specifically on Linux, allowing the content to be a highly specialized source of information for open source enthusiasts readers found that vi was the most widely used text editor among respondents, beating the second most widely used editor by nearly a factor of two (36% to 19%)[6].
Contents |
Interface
vi is a modal In user interface design, a mode is a distinct setting within a computer program or any physical machine interface, in which the same user input will produce perceived different results than it would in other settings. The best-known modal interface components are probably the Caps lock and Insert keys on the standard computer keyboard, both of 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. A perceived advantage of vi's separation of text entry and command modes is that both text editing and command operations can be performed without requiring the removal of the user's hands from the home row. As non-modal editors usually have to reserve all keys with letters and symbols for the printing of characters, any special commands for actions other than adding text to the buffer must be assigned to keys which don't produce characters, such as function keys, or combinations of modifier keys such as Ctrl, and Alt with regular keys. Vi has the advantage that most ordinary keys are connected to some kind of command for positioning, altering text, searching and so forth, either singly or in key combinations. Many commands can be touch typed without the use of ⇧ Shift,Ctrl or Alt. Other types of editors generally require the user to move their hands from the home row when touch typing Touch typing is typing without using the sense of sight to find the keys. Specifically, a touch typist will know their location through muscle memory. Touch typing involves placing the eight fingers in a horizontal row along the middle of the keyboard and having them reach for other keys. Most computer keyboards have a raised dot or bar on either:
- To use a mouse to select text, commands, or menu items in a GUI A graphical user interface (sometimes pronounced gooey) is a type of user interface item that allows people to interact with programs in more ways than typing such as computers; hand-held devices such as MP3 players, portable media players or gaming devices; household appliances and office equipment with images rather than text commands. A GUI editor.
- To the arrow keys or editing functions (Home / End or Function Keys A function key is a key on a computer or terminal keyboard which can be programmed so as to cause an operating system command interpreter or application program to perform certain actions. On some keyboards/computers, function keys may have default actions, accessible on power-on).
- To invoke commands using modifier keys In computing, a keyboard is an input device, partially modeled after the typewriter keyboard, which uses an arrangement of buttons or keys, to act as mechanical levers or electronic switches. A keyboard typically has characters engraved or printed on the keys and each press of a key typically corresponds to a single written symbol. However, to in conjunction with the standard typewriter keys.
The design of vi is based on considering the needs of users after they have become proficient, and who then require, from the software, efficiency and convenience rather than ease of learning. Another design assumption in vi is that inserting text is not the most important operation: people who maintain text files as part of their job need to be able to quickly move around in those files, and quickly make small, precise edits in different locations. The cost of transitions to insert mode is reduced by combining the mode switch with other commands. For instance, replacing a word is cwreplacement textEscape which is a combination of two independent commands (change and word-motion) together with a transition into and out of insert mode.
Text between the cursor position and the end of the word is overwritten by the replacement text. It's also noteworthy that an operation like this is considered one indivisible command making a single logical change. Thus both the entry of the new text and the deletion of the word can be undone by typing u. Moreover, the operation can be repeated at some other location by typing ., the effect being that the word starting that location will be replaced with the same replacement text.
The vi configuration file
| This article is written like a manual or guidebook. Please help rewrite this article from a neutral point of view. (January 2010) |
When vi editor is started, the editor searches for the environment variable $EXINIT and uses the contents of the file it points to as configuration commands, if it exists. If EXINIT is not defined, vi looks for the .exrc file (vi editor's startup file) in HOME directory, and uses its configuration commands. Finally, vi looks in current directory for a file named .exrc and executes the commands in that file, if it exists.
The .exrc file can contain comments, ex commands (such as ":set showmode"),"Map" commands, and macro definitions. "Map" commands help to customize the vi editor by allowing to redefine the meaning of keys when in command mode
EX commands in vi
Ex is a line editor that serves as the foundation for the screen editor vi. Ex commands work on the current line or on a range of lines in a file.
Syntax of Ex commands :[address] command [options]
':' specifies an Ex command.
Address The 'address' specifies the lines number or range of lines that are the object of command. If no address is given, the current line is the object of the command.
Address Ranges can be specified in a number of ways in Ex command syntax. Examples of this include
| Syntax | Range |
|---|---|
| :% | All the lines in the file. |
| :1,$ | All the lines in the file. |
| :^,$ | All the lines in the file. |
Commands
| Command | Ex Syntax | Operation |
|---|---|---|
| Substitute | :%s/str1/str2/g | Substitute str1 by str2 in the Address range specified as whole file. |
| Copy and Paste | :t8 | Copy current line and Paste after Line number 8. |
Options
| Option | Operation |
|---|---|
| ! | Specifies the command has to be executed forcefully. |
| destination | Specifies the Line number where the text is to be pasted. Used with Copy and Move commands. |
| count | Specifies the number of times command is to be repeated. This number always succeeds the command. |
| fname | Specifies that the object is a file name "fname". |
Customize vi editor
| ex command | operation |
|---|---|
| :set showmode | Show when you are in insert mode. |
| :set ic | Ignore case when searching |
| :set noic | Ignore case off |
| :set number | Line numbering on (also ":set nu") |
| :set nonumber | Line numbering off (also ":set nonu") |
| :set all | List settings of all options. |
| :set ai | Autoindent on. Facilitates structured insertion of text. |
| :set noai | Autoindent off. |
| :set wrapmargin=2 | Set margin for insertion of new line in input mode as 2. |
| :set autoprint | Display the current line after execution of ex copy, move, or substitute command. |
| :set window=40 | set the number of lines in a vi window as 40. |
| :set scroll=11 | set the number of lines scrolled in a vi window as 11 when <Ctrl> D is pressed. |
History
ADM3A keyboard layoutvi was derived from a sequence of UNIX command line editors, starting with ed ed is a line editor for the Unix operating system. It was one of the first end-user programs hosted on the system and has been standard in Unix-based systems ever since. ed was originally written by Ken Thompson and contains one of the first implementations of regular expressions. Prior to that implementation, the concept of regular expressions. ed was enhanced to become em (the "editor for mortals" by George Coulouris while a lecturer at Queen Mary College Queen Mary, University of London is a constituent college of the University of London. Queen Mary is one of the largest Colleges of the University of London and it offers degree programmes and research across 21 academic departments and institutes, within three sectors: Science and Engineering; Humanities, Social Sciences and Laws; and Barts and), then en.[7] At the University of California, Berkeley The University of California, Berkeley , is a public research university located in Berkeley, California, United States. The oldest of the ten major campuses affiliated with the University of California, Berkeley offers some 300 undergraduate and graduate degree programs in a wide range of disciplines. The university occupies 6,651 acres (2,692 ha), Bill Joy "extended" em to create ex, including the addition of a visual mode. Eventually it was observed that most ex users were spending all their time in visual mode,[citation needed] and Joy created a direct entry command called vi.
Joy used a Lear-Siegler ADM3A terminal A computer terminal is an electronic or electromechanical hardware device that is used for entering data into, and displaying data from, a computer or a computing system. Early terminals were inexpensive devices but very slow compared to punched cards or paper tape for input, but as the technology improved and video displays were introduced,. On this terminal, the Escape key was at the location now occupied by the Tab key on the widely-used IBM PC keyboard The IBM PC keyboard and its derivative computer keyboards are standardized. However, during the 20 years of the PC architecture being constantly updated, several types of keyboards have been developed (on the left side of the alphabetic part of the keyboard, one row above the middle row). This made it a convenient choice for switching vi modes. Also, the keys h,j,k,l Cursor movement keys or arrow keys are buttons on a computer keyboard that are either programmed or designated to move the cursor in a specified direction. The term "cursor movement key" is distinct from "arrow key" in that the former term may refer to any of various keys on a computer keyboard designated for cursor movement, served double duty as cursor movement keys and were inscribed with arrows, which is why vi uses them in that way. The ADM3A had no other cursor keys. Joy explained that the terse, single character commands and the ability to type ahead of the display were a result of the slow 300 baud In digital communications, symbol rate, also known as baud or modulation rate; is the number of symbol changes made to the transmission medium per second using a digitally modulated signal or a line code. The Symbol rate is measured in baud (Bd) or symbols/second. In the case of a line code, the symbol rate is the pulse rate in pulses/second. Each modem he used when developing the software and that he wanted to be productive when the screen was painting slower than he could think.[7]
In 1979,[citation needed] Mark Horton took on responsibility for vi.[citation needed] Horton added support for arrow and function keys, macros,[citation needed] and improved performance by replacing termcap with terminfo. In 1983,[citation needed] vi was added to Bell Labs System V Unix System V, commonly abbreviated SysV , is one of the versions of the Unix operating system. It was originally developed by American Telephone & Telegraph (AT&T) and first released in 1983. Four major versions of System V were released, termed Releases 1, 2, 3 and 4. System V Release 4, or SVR4, was commercially the most successful and has not significantly changed since.
vi became the de facto De facto is a Latin expression that means "by [the] fact". In law, it is meant to mean "in practice but not necessarily ordained by law" or "in practice or actuality, but without being officially established". It is commonly used in contrast to de jure when referring to matters of law, governance, or technique (such standard Unix Unix is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna. Today's Unix systems are split into various branches, developed over time by AT&T as well as various commercial vendors and non-profit editor and a nearly undisputed hacker Today, mainstream usage mostly refers to computer criminals, due to the mass media usage of the word since the 1980s. This includes script kiddies, people breaking into computers using programs written by others, with very little knowledge about the way they work. This usage has become so predominant that a large segment of the general public is favorite outside of MIT The Massachusetts Institute of Technology is a private research university located in Cambridge, Massachusetts. MIT has five schools and one college, containing a total of 32 academic departments, with a strong emphasis on scientific and technological research. MIT is one of two private land-grant universities[b] and is also a sea-grant and space- until the rise of Emacs Emacs is a class of feature-rich text editors, usually characterized by their extensibility. Emacs has, perhaps, more editing commands than other editors, numbering over 1,000 commands. It also allows the user to combine these commands into macros to automate work after about 1984. The Single UNIX Specification The Single UNIX Specification is the collective name of a family of standards for computer operating systems to qualify for the name "Unix". The SUS is developed and maintained by the Austin Group, based on earlier work by the IEEE and The Open Group specifies vi, so every conforming system must have it.
vi is still widely used by users of the Unix family of operating systems. About half the respondents in a 1991 USENET Duke University graduate students Tom Truscott and Jim Ellis conceived the idea in 1979 and it was established in 1980. Users read and post public messages to one or more categories, known as newsgroups. Usenet resembles bulletin board systems (BBS) in most respects, and is the precursor to the various Internet forums that are widely used today; poll preferred vi.[3] In 1999, Tim O'Reilly Tim O'Reilly (born June 6, 1954) is the founder of O'Reilly Media (formerly O'Reilly & Associates) and a supporter of the free software and open source movements. He is widely credited with coining the term Web 2.0, founder of the eponymous computer book publishing company, stated that his company sold more copies of its vi book than its emacs book.[8]
Derivatives and clones
The startup screen of vi clone vim Vim is a text editor released by Bram Moolenaar in 1991 for the Amiga computer. The name "Vim" is an acronym for "Vi IMproved" because Vim was created as an extended version of the vi editor, with many additional features designed to be helpful in editing program source code- 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 Vim is a text editor released by Bram Moolenaar in 1991 for the Amiga computer. The name "Vim" is an acronym for "Vi IMproved" because Vim was created as an extended version of the vi editor, with many additional features designed to be helpful in editing program source code "Vi IMproved" has yet more features than vi, including (scriptable) syntax highlighting Syntax highlighting is a feature of some text editors that display text—especially source code—in different colors and fonts according to the category of terms. This feature eases writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct. Highlighting does, mouse support, graphical versions, visual mode, many new editing commands and a large amount of extension in the area of ex commands. Vim is included with almost every Linux distribution (and is also shipped with every copy of Apple Apple Inc. is an American multinational corporation that designs and markets consumer electronics, computer software, and personal computers. The company's best-known hardware products include the Macintosh computers, the iPod, the iPhone and the iPad. Apple software includes the Mac OS X operating system; the iTunes media browser; the iLife suite Mac OS X Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, Mac OS X has been included with all new Macintosh computer systems. It is the successor to Mac OS 9, the final release of the "classic" Mac OS, which had been Apple's primary operating system since 198). Vim also has a vi compatibility mode, controlled by the
:set compatible[9] option. This mode is automatically turned on by Vim when it is started in a situation which looks as if the software might be expected to be vi compatible.[10] Vim then changes some of its behaviors such that they are compatible with the vi standard. Vim features which do not conflict with vi compatibility are always available, regardless of the setting. - Elvis is a free vi clone for Unix and other operating systems. This is the standard version of vi shipped on Slackware Linux, Kate OS and MINIX MINIX is a Unix-like computer operating system based on a microkernel architecture created by Andrew S. Tanenbaum for educational purposes; MINIX also inspired the creation of the Linux kernel.
- vile was initially derived from an early version of Microemacs in an attempt to bring the Emacs Emacs is a class of feature-rich text editors, usually characterized by their extensibility. Emacs has, perhaps, more editing commands than other editors, numbering over 1,000 commands. It also allows the user to combine these commands into macros to automate work multi-window/multi-buffer editing paradigm to vi users.
- BusyBox BusyBox is a software application released as Free software under the GNU General Public License that provides many standard Unix tools, much like the larger GNU Core Utilities. BusyBox is designed to be a small executable for use with the Linux kernel, which makes it ideal for use with embedded devices. It has been self-dubbed "The Swiss, a set of standard Linux utilities in a single executable, includes a tiny vi clone.
Plugins for other applications that emulate vi
- Applications such as MS Word and MS Outlook, Mozilla Firefox Mozilla Firefox is a free and open source web browser descended from the Mozilla Application Suite and managed by Mozilla Corporation. A Net Applications statistic put Firefox at 24.59% of the recorded usage share of web browsers as of April 2010[update], making it the second most popular browser in terms of current use worldwide after Microsoft's and IDEs such as Eclipse Eclipse is a multi-language software development environment comprising an integrated development environment and an extensible plug-in system. It is written primarily in Java and can be used to develop applications in Java and, by means of the various plug-ins, in other languages as well, including C, C++, COBOL, Python, Perl, PHP, and others, Visual Studio Microsoft Visual Studio is an Integrated Development Environment from Microsoft. It can be used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all platforms supported by Microsoft Windows, Windows, IntelliJ IDEA, JBuilder, NetBeans NetBeans refers to both a platform framework for Java desktop applications, and an integrated development environment for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and others, and TextMate TextMate is a general-purpose GUI text editor for Mac OS X created by Allan Odgaard. Its users are mostly programmers, though it has been used for screenwriting . Notable features include declarative customizations, tabs for open documents, recordable macros, folding sections and snippets, shell integration, and an extensible bundle system, Wing IDE can emulate vi with the help of downloadable[11] plugins. Emacs Emacs is a class of feature-rich text editors, usually characterized by their extensibility. Emacs has, perhaps, more editing commands than other editors, numbering over 1,000 commands. It also allows the user to combine these commands into macros to automate work has a vi emulation mode called viper-mode.[12]
See also
| Book:Editor Wars | |
| Books are collections of articles that can be downloaded or ordered in print. | |
- List of text editors
- Comparison of text editors
- visudo, an implementation of vi used to edit the
/etc/sudoersfile - List of Unix programs This is a list of UNIX utilities as specified by IEEE Std 1003.1-2004, which is part of the Single UNIX Specification . These utilities can be found on UNIX Operating systems and most UNIX-like operating systems
- Vimperator
References
- ^ The Open Group (1997), "vi - screen-oriented (visual) display editor", Single Unix Specification, Version 2, http://opengroup.org/onlinepubs/007908799/xcu/vi.html, retrieved 2009-01-25
- ^ Bolsky, M. I. (1984). The vi User's Handbook. AT&T Bell Laboratories. ISBN 1-394-1733-8.
- ^ a b Raymond, Eric S; Guy L. Steele, Eric S. Raymond (1996). (ed.). ed. The New Hacker's Dictionary (3rd ed.). MIT Press. ISBN 0-262-68092-0.
- ^ Gross, Christian (2005). Open Source for Windows Administrators. Charles River Media. pp. 55. ISBN 1-584-50347-5.
- ^ Thomer M Gil, Vi Lovers Home Page, http://thomer.com/vi/vi.html, retrieved 2009-01-24
- ^ Gray, James (1 June 2009), Readers’ Choice Awards 2009, Linux Journal, http://www.linuxjournal.com/article/10451, retrieved 2010-01-22
- ^ a b Vance, Ashlee (September 11, 2003). "Bill Joy's greatest gift to man – the vi editor". The Register. http://www.theregister.co.uk/2003/09/11/bill_joys_greatest_gift/. Retrieved 2008-12-05.
- ^ "Ask Tim Archive". O'Reilly. June 21, 1999. http://www.oreilly.com/pub/a/oreilly/ask_tim/1999/unix_editor.html.
- ^ "Vim documentation: options". vim.net/sourceforge.net. http://vimdoc.sourceforge.net/htmldoc/options.html#'compatible'. Retrieved January 30, 2009.
- ^ "Vim documentation: starting". vim.net/sourceforge.net. http://vimdoc.sourceforge.net/htmldoc/starting.html#compatible-default. Retrieved January 30, 2009.
- ^ "TextEditors Wiki: ViFamily". http://texteditors.org/cgi-bin/wiki.pl?ViFamily. Retrieved 2009-06-22.
- ^ "ViperMode". http://www.emacswiki.org/emacs/ViperMode. Retrieved 2009-06-23.
Further reading
- Lamb, Linda; Arnold Robbins (1998). Learning the vi Editor (6th Edition). O'Reilly & Associates, Inc. http://www.oreilly.com/catalog/vi6/.
- Robbins, Arnold; Linda Lamb, Elbert Hannah (2008). Learning the vi and Vim Editors, Seventh Edition. O'Reilly & Associates, Inc. http://oreilly.com/catalog/9780596529833/.
External links
| Wikibooks has more on the topic of Vi |
- The original Vi version, adapted to more modern standards
- An Introduction to Display Editing with Vi, by Mark Horton and Bill Joy
- vi lovers home page
- "Bill Joy's greatest gift to man – the vi editor," from The Register
- explanation of modal editing with vi -- "Why, oh WHY, do those #?@! nutheads use vi?"
Categories: Free text editors | Unix text editors | Mac OS X text editors | Unix SUS2008 utilities | Linux text editors
|
Brookings Institution
In fact, unless major constitutional reforms are undertaken to redistribute power to elected institutions, the Morocco of King Mohammed VI will soon come to ...
Moroccan court rejects media appeal against seizure AFP
Moroccan authorities seize magazines publishing poll on King magharebia.com
Don't rate the king Menassat
France24 - Al-Arabiya - Maghreb Arabe Presse
all 71 news articles »
Jill Dickin Schinas
Fri, 23 Jul 2010 11:00:31 GM
Caribbean, Part . VI. If it's Monday it must be the Dominican Republic. by Jill Dickin Schinas Published on the 23rd of July 2010 in Logbook No Comments. Molly sets sail leaving Cherub in her wake. The northern winter was trickling ...

