Nếu bạn đã thực hiện một sai lầm sau khi một vài dòng, ví dụ, cách nhấn Backspace cho đến khi bạn đã bị xóa sai lầm và bắt đầu một lần nữa không phải luôn luôn 5. Nhấn một lần nữa, sau đó gõ: bỏ thuốc lá! Nếu bạn đã thực hiện một sai lầm sau khi một vài dòng, ví dụ, cách nhấn Backspace cho đến khi bạn đã bị xóa sai lầm và bắt đầu một lần nữa không phải luôn luôn | Learning the vi editor Print version - Wikibooks http w title Learning_the. 1. Use the method in the previous section. 2. Press i then enter The quick fox jumps over the dog normally. 3. Press Escape then press h until the cursor is at the letter f of fox . Press i and then type brown . 4. Press Escape then press l until the cursor is at the letter d . Press i and then type lazy . 5. Press Escape again then type quit . More on movement Using h j k and l is ok but vi understands more than rows and columns. These are some commands that move by text objects w moves forward to the beginning of the next word. b moves backwards to the beginning of the previous word. and move by sentences either backward or forward. and move by paragraphs. Deleting things If you have made a mistake after a few lines for instance pressing Backspace until you have erased the mistake and starting again isn t always the best solution. We need a method of deleting mistakes that happen in the normal course of editing. vi allows you several methods of deleting text based on how much you want to remove. Now that you are familiar with moving around once you ve moved the cursor to where your error is the x key deletes one character pressing dw deletes one word. pressing dd deletes one line Exercise From now on we will omit the steps for you to start and quit the editor - you should be already familiar with those. 1. Enter the following text Sad I been here I wouldnt ever ever leave. 2. Change the word Sad to Had . 3. Add an apostrophe after wouldn . 4. Delete the extra ever . 5. Delete the line. Solution 1. Type the text normally. You should already be familiar with entering insert mode and leaving it. 2. Enter command mode use h to get to the start of the line and then press x to delete the S. Press i to insert the H then leave insert mode by pressing Escape. 3. Now position the cursor on the t and press i to insert the. Leave insert mode. 4.