![]() But which the developers of VI called EX mode because it returns you to the same line editing prompt that the EX editor had before the visual mode VI was developed. When you type certain commands including colon, slash, exclamation point or question mark, it puts you into what I call, Prompt mode. ![]() In addition to Command and Insert mode, VI has another mode, a kind of a pseudo mode, which I call Prompt mode. Now you see that the word Insert has vanished from the bottom of the screen. So I just hit backspace to delete those characters I just typed. Now that I am in Insert mode, if I type an h, it actually is inserted into the file, l, k and so on. Note that when I type the i, the word Insert appeared at the bottom of the screen, telling me that I'm in Insert mode. And now I will type i to enter Insert mode. Or an h to move it to the left, h, h, h, h, l, l, l. If I type an l, it moves the cursor to the right, l, l, l, l. So, for example, j moves the cursor down one character, j, j. In this mode, the letters that you type at the keyboard are interpreted as commands. So we've just entered VI and now we're in Command mode, which is where you start. We'll start by editing our Duke of York example again. You can keep typing as much as you like in Insert mode, but when you're done inserting and you want to go back to editing the file, you press the Esc key. ![]() When you're in Insert mode, the keys that you press on the keyboard result in inserting characters into the file. When you press certain commands, including i, a, o and c, or their uppercase versions, it puts you into Insert mode. For example, H and L move backwards and forwards through the current line, and O opens a new line for typing. In Command mode, the keys that you press on the keyboard are interpreted as commands that tells VI to do things. A mode determines what happens when you press a key on the keyboard. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |