Mở một dòng mới bên dưới dòng hiện tại để bắt đầu gõ ký tự hiện tại Xoá bỏ và thay thế với văn bản mới thay thế? với l, w, $, c để thay đổi ký tự hiện tại, từ, cuối dòng, hoặc dòng thay thế nhân vật hiện tại với kế tiếp bạn gõ | Appendix A Using vi or Vim Editors Table A-2 Commands for Changing Text continued Key Result Key Result o Open a new line below current line to begin typing Shift o Open a new line above current line to begin typing s Erase current character and replace with new text Shift s Erase current line and enter new text c Replace with l w or c to change the current letter word end of line or line Shift c Erase from cursor to end of line and enter new text r Replace current character with the next one you type Shift r Overwrite as you type from current character going forward Table A-3 contains keys you type to delete or paste text. Table A-3 Commands for Deleting and Pasting Text Key Result Key Result x Delete text under cursor Shift x Delete text to left of cursor d Replace with l w or d to cut the current letter word or end of line from cursor or entire line Shift d Cut from cursor to end of line y Replace with l w or to copy yank the current letter word or end of line from cursor Shift y Yank current line p Pastes cut or yanked text after cursor Shift p Pastes cut or yanked text before cursor Using Miscellaneous Commands Table A-4 shows a few miscellaneous but important commands you should know. 293 Appendix A Using vi or Vim Editors Table A-4 Miscellaneous Commands Key Result u Type u to undo the previous change. Multiple u commands will step back to undo multiple changes. . Typing a period . will repeat the previous command. So if you deleted a line replaced a word changed four letters and so on the same command will be done wherever the cursor is currently located. Entering input mode again resets it. Shift j Join the current line with the next line. Esc If you didn t catch this earlier the Esc key returns you from an input mode back to command mode. This is one of the keys you will use most often. Modifying Commands with Numbers Nearly every command described so far can be modified with a number. In other words instead of deleting a word replacing a letter or .