1 / 26

Linux II - vi editor-

Linux II - vi editor-. 황 강 욱 Division of Applied Mathematics KAIST. Entering vi. To call the VI editor and begin an editing session, type at the UNIX prompt ($): $ vi file_name. ~ ~ ~ ~ ~ ~ ~ “ file_name ” [new file]. Exiting the editor. retaining the changes.

jethro
Télécharger la présentation

Linux II - vi editor-

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linux II- vi editor- 황 강 욱 Division of Applied Mathematics KAIST

  2. Entering vi • To call the VI editor and begin an editing session, type at the UNIX prompt ($): $ vi file_name ~ ~ ~ ~ ~ ~ ~ “file_name” [new file] Next Generation Communication Networks Lab.

  3. Next Generation Communication Networks Lab.

  4. Exiting the editor • retaining the changes Next Generation Communication Networks Lab.

  5. Keeping changes and the original text Next Generation Communication Networks Lab.

  6. Inside vi • Command mode vs. Text input mode Next Generation Communication Networks Lab.

  7. Positioning text on the screen • scrolling the screen Next Generation Communication Networks Lab.

  8. goto : 1G, 100G, G • search n N Next Generation Communication Networks Lab.

  9. the cursor movement in the screen • 3H, 5L, M in the screen • left, right, up, down or the usual arrow keys Next Generation Communication Networks Lab.

  10. the cursor movement in the line Next Generation Communication Networks Lab.

  11. Text Insertion • Append Command (a) Next Generation Communication Networks Lab.

  12. Append Command (A) Next Generation Communication Networks Lab.

  13. Insert Command (i) Next Generation Communication Networks Lab.

  14. Insert Command (I) Next Generation Communication Networks Lab.

  15. Open Command (o, O) Next Generation Communication Networks Lab.

  16. Read Command (:r) (already existing file) Next Generation Communication Networks Lab.

  17. Correcting Text • Delete Text (d, D) Next Generation Communication Networks Lab.

  18. Change Text (c, C) Next Generation Communication Networks Lab.

  19. Replace Command (r, R) Next Generation Communication Networks Lab.

  20. Erase Command (x, X) Next Generation Communication Networks Lab.

  21. Transposition Command (xp) Next Generation Communication Networks Lab.

  22. Undo Command (u, U) • search and replace commands • :-1,$s/찾을문자/대치문자/gc 현재 라인부터, 확인메세지(y) • :,$s/찾을문자/대치문자/gc 다음 라인부터, 확인메세지(y) • :$8,22s/찾을문자/대치문자/g 라인8~22까지, 확인 없음 • :%s/\<찾을단어\>/대치문자/g 전체파일에서, 확인 없음 Next Generation Communication Networks Lab.

  23. Copying Text and Moving the Copy Next Generation Communication Networks Lab.

  24. Next Generation Communication Networks Lab.

  25. Deleting Text and Moving It Next Generation Communication Networks Lab.

  26. Named Buffers • copy or delete: “g7yy or “g7dd • paste : “gp • creating line numbering • :set number • :set nonu buffer name (a~z) Next Generation Communication Networks Lab.

More Related