![]() The creators of vi tried to make the commands easy to remember. As you will see shortly, there are all sorts of commands available for doing things like moving the cursor, deleting text, finding and replacing text, etc. All keys you press while in command mode will be interpreted by vi as commands (so be careful!). When you launch vi, it always starts in command mode.These are called command mode and insert mode. Vi solves this problem by having two "modes" of operation. There has to be some way for vi to know what your intent is when you go pressing a key. For the most part, regular keys are used. There are a few instances when you have to press a unique key to give a command. Vi takes the most unusual (some would say ingenious) approach of using the "regular" keys for both purposes! That is, you use the same keys on the keyboard for entering text and for issuing commands. Pressing just the "regular" keys (the alphabetic keys, digit keys, or punctuation keys) simply results in text being entered into your document. Most other editors and word processors require you to press special keys on the keyboard (function keys, the Control key, the arrow keys, etc.) to give commands. But, you also need to give commands to the editor - to tell it to find a word, delete text, save your file, etc. You need to type text into your document. When you use any text editor, you need to be able to do two basic things. The original file is untouched until you "write" (save) the file to disk. Any changes you make are made only to the copy. This means that if you edit a previously existing file, vi copies the file into a temporary storage space (the buffer), and you edit the copy. It is essential to understand that when you are editing a file, you are working with a buffer. This document, however, covers only the original vi editor (but all the features discussed, and more, are available in vim). Some of the extra features it offers are multiple levels of undo and redo (instead of just one) and a screen display indicating when you are in insert mode (see next section). A favorite of these is the vim ("vi improved") editor that is available on many Linux systems (if so, it can be launched from the command prompt by typing vim or vim filename). These generally have all the features of vi, and more. Note that several vi-like editors have been developed. VI TEXT EDITOR MANUALPerhaps the definitive documentation is contained in the articles An Introduction to Display Editing with Vi and Ex Reference Manual, both by William Joy, and found in the Unix User's Manual Supplementary Documents. Please refer to other documentation for complete coverage. This document does not attempt to cover all of the commands and facilities available in vi. It offers one of the best, if not the best, text editors around. It operates quite differently than most text editors, and this makes it undesirable for many people. It acts as a window to the file you are editing, using all but the last line of the screen for the display of text being edited. It is a visual extension of an older UNIX editor, hence the name vi. If you have problems with or questions about the contents of this takeout, you may call the VCU IT Support Center at 80.īill Joy wrote the vi (pronounced "vee-eye") text editor of the University of California at Berkeley. Thus, the instruction press means to press the letter " m" key. In this article, we will use brackets " " to indicate keys to be pressed. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |