
Move up or down several lines and to be refreshed. $ move cursor to end of current line w move cursor to beginning of next word b move cursor back to beginning of preceding word :0 or 1G move cursor to first line in file :n or nG move cursor to line n :$ or G move cursor to last line in file That the key should be held down while the In the table below, the symbol ^ before a letter means
#Command line text editor Pc
If you go back and forth between a PC environment and a UNIXĮnvironment, you may find that this dissimilarity in methods forĬursor movement is the most frustrating difference between the two. Keys sometimes produce strange effects in vi and should The Qwerty keyboard (containing no arrow keys) in mind, the arrow May be used as well however, since vi was designed with Move the cursor within the vi editor screen (or window). Unlike many of the PC and MacIntosh editors, the mouse does not To file named in original invocation :q quit (or exit) vi * To file named in original invocation :wq quit vi, writing out modified file Note: The cursor moves to bottom of screen whenever aĬolon ( :) is typed. Usually the new or modified file is saved when you Vi filename edit filename starting at line 1 vi -r filename recover filename that was being Of the file will be displayed if the file does not exist, then anĮmpty file and screen are created into which you may enter text. The file named filename exists, then the first page (or screen) To use vi on a file, type in vi filename. Letter the results will not be what you expect. NOTE: Both UNIX and vi are case-sensitive.īe sure not to use a capital letter in place of a lowercase With practice, these commands should become automatic. The most basic and useful commands are marked with an asterisk Of these is usually sufficient for beginning vi users.Ĭontains a sampling of basic vi commands. While there are a number of vi commands, just a handful In the insert mode, every character typed is added to the text Something to the text file being edited a character typed in theĬommand mode may even cause the vi editor to enter the In the command mode, every character typed is a command that does
#Command line text editor full
The UNIX vi editor is a full screen editor and has two modes of [Alternate editors for UNIX environments include pico

UNIX operating system is called vi ( visual editor).

What is vi? The default editor that comes with the
