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:

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 layout

vi 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

Plugins for other applications that emulate vi

See also

Free software portal Free software is software that is distributed in a manner that allows its users to run the software for any purpose, to redistribute copies of, and to examine, study, and modify the source code. The term free software was coined in 1983, with free denoting the broad freedom given to users, rather than being available free of charge . Alternative
Book:Editor Wars
Books are collections of articles that can be downloaded or ordered in print.
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 command line A command-line interface is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks. This text-only interface contrasts with the use of a mouse pointer with a graphical user interface (GUI) to click on options, or menus on a text user interface (TUI) to select options. This method of programs and builtins (more 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)
File system cat · cd · chmod · chown · chgrp · cksum · cmp · cp · dd · du · df · fsck · fuser · ln · ls · lsattr · lsof · mkdir · mount · mv · pwd · rm · rmdir · split · touch · umask
Processes at · chroot · cron · exit · kill · killall · nice · pgrep · pidof · pkill · ps · pstree · sleep · time · top · wait
User environment env · finger · id · logname · mesg · passwd · su · sudo · uptime · w · wall · who · whoami · write
Text processing awk · comm · csplit · cut · ed · ex · fmt · head · iconv · join · less · more · paste · sed · sort · strings · talk · tail · tr · uniq · vi · wc · xargs
Shell programming alias · basename · dirname · echo · expr · false · printf · test · true · unset
Networking inetd · host · ifconfig · netstat · nslookup · ping · rlogin · netcat · traceroute
Searching find · grep · locate · whereis · which
Miscellaneous apropos · banner · bc · cal · clear · date · dd · file · help · history · info · lp · lpr · man · pax · size · tee · tput · type · uname · whatis · yes

References

  1. ^ 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
  2. ^ Bolsky, M. I. (1984). The vi User's Handbook. AT&T Bell Laboratories. ISBN 1-394-1733-8.
  3. ^ 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.
  4. ^ Gross, Christian (2005). Open Source for Windows Administrators. Charles River Media. pp. 55. ISBN 1-584-50347-5.
  5. ^ Thomer M Gil, Vi Lovers Home Page, http://thomer.com/vi/vi.html, retrieved 2009-01-24
  6. ^ Gray, James (1 June 2009), Readers’ Choice Awards 2009, Linux Journal, http://www.linuxjournal.com/article/10451, retrieved 2010-01-22
  7. ^ 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.
  8. ^ "Ask Tim Archive". O'Reilly. June 21, 1999. http://www.oreilly.com/pub/a/oreilly/ask_tim/1999/unix_editor.html.
  9. ^ "Vim documentation: options". vim.net/sourceforge.net. http://vimdoc.sourceforge.net/htmldoc/options.html#'compatible'. Retrieved January 30, 2009.
  10. ^ "Vim documentation: starting". vim.net/sourceforge.net. http://vimdoc.sourceforge.net/htmldoc/starting.html#compatible-default. Retrieved January 30, 2009.
  11. ^ "TextEditors Wiki: ViFamily". http://texteditors.org/cgi-bin/wiki.pl?ViFamily. Retrieved 2009-06-22.
  12. ^ "ViperMode". http://www.emacswiki.org/emacs/ViperMode. Retrieved 2009-06-23.

Further reading

External links

Wikibooks has more on the topic of Vi

Categories: Free text editors | Unix text editors | Mac OS X text editors | Unix SUS2008 utilities | Linux text editors

 

The above information uses material from Wikipedia and is licensed under the GNU Free Documentation License.
Some facts may not have been fully verified for accuracy. [Disclaimers]
This page was last archived by our server on Sun Aug 1 05:33:53 2010. [ refresh local cache ]
Displaying this page or its contents does not use any Wikimedia Foundation's resources.
The owners of this site proudly support the Wikimedia Foundation.


Morocco's King Mohammed VI: 10 Years ... - Brookings Institution
news.google.com
Morocco's King Mohammed VI : 10 Years and Counting

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 &raquo;
Google News Search: Vi,
Sun Aug 30 12:31:41 2009
Caribbean, Part VI If it's Monday it must be the Dominican ...
yachtmollymawk.com
Caribbean, Part VI If it's Monday it must be the Dominican ...

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 ...

Google Blogs Search: Vi,
Sat Jul 31 11:50:08 2010