课程: Linux: System Information and Directory Structure Tools

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Editing text in Vim

Editing text in Vim

- [Instructor] Let's talk about editing text in Vim. We'll start Vim with a new text file. Type in vim, space, editfile.txt, and hit Enter. Now it's going to insert mode by pressing the I key and add some text. Line One, Two, and Three. We'll copy and paste, which Vim calls yank and put, as well as cut and paste, which Vim calls delete and put. Go to normal mode by pressing the Escape key. To copy a letter, type yl, a word, type yw, and to copy a line, type yy. Now put your cursor over the word One and press yw. Now go to the end of the line and press p to put. Now put your cursor over the second line and press yy followed by p. Now you should have two Line Twos. To cut or delete a letter, type dl, for a word, type dw, and for a line, type dd. Whenever you delete text in Vim it places it in the clipboard, similar to cutting text in other editors. Put your cursor over Line One and press dd. Now go to the end of the…

内容