Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Vi (text editor)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Interface== [[File:Vi source code join line logic.png|thumb|The vi editor employed minimal logic that would aid the user. This included trivial aids such as how to join two lines together and maintain reasonable usage of whitespace.]] [[File:XPG6 vi editing its own source code on a serial terminal.png|thumb|The vi editor has a number of revisions; however, the primary purpose was to allow a user to enjoy the full "visual" screen mode of modern terminals.]] vi is a modal editor: it operates in either ''insert mode'' (where typed text becomes part of the document) or ''command mode'' (where keystrokes are interpreted as commands that control the edit session). For example, typing {{keypress|i}} while in command mode switches the editor to insert mode, but typing {{keypress|i}} again at this point places an "i" character in the document. From insert mode, pressing {{keypress|[[Escape key|ESC]]}} switches the editor back to command 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 that do not produce characters, such as function keys, or combinations of modifier keys such as {{keypress|Ctrl}}, and {{keypress|Alt}} with regular keys. Vi has the property 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 {{keypress|Ctrl}} or {{keypress|Alt}}. Other types of editors generally require the user to move their hands from the home row when [[touch typing]]: * To use a mouse to select text, commands, or menu items in a [[GUI]] editor. * To the arrow keys or editing functions (Home / End or [[Function Keys]]). * To invoke commands using [[keyboard (computing)|modifier keys]] in conjunction with the standard typewriter keys. For instance, in vi, replacing a word is {{keypress|c}}{{keypress|w}}''replacement text''{{keypress|Escape}}, 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. The operation can be repeated at some other location by typing {{keypress|.}}, the effect being that the word starting at that location will be replaced with the same replacement text. A [[human–computer interaction]] textbook notes on its first page that "One of the classic UI foibles—told and re-told by HCI educators around the world—is the vi editor's lack of feedback when switching between modes. Many a user made the mistake of providing input while in command mode or entering a command while in input mode."<ref name="MacKenzie2012">{{cite book |author=I. Scott MacKenzie |title=Human-Computer Interaction: An Empirical Research Perspective |year=2013 |publisher=Morgan Kaufmann, an imprint of Elsevier |isbn=978-0-12-405865-1 |page=1}}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Vi (text editor)
(section)
Add topic