งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

Vi ธวัชชัย เอี่ยมไพโรจน์. เรื่องทั่วๆไปของ vi ถ้าเป็น server ที่ใช้ร่วมกันหลายๆคน อย่าง น้อยจะต้องมี vi และ emacs ไว้ให้ใช้ vi commands มีมากมาย แต่ที่ใช้บ่อยมัไม่

งานนำเสนอที่คล้ายกัน


งานนำเสนอเรื่อง: "Vi ธวัชชัย เอี่ยมไพโรจน์. เรื่องทั่วๆไปของ vi ถ้าเป็น server ที่ใช้ร่วมกันหลายๆคน อย่าง น้อยจะต้องมี vi และ emacs ไว้ให้ใช้ vi commands มีมากมาย แต่ที่ใช้บ่อยมัไม่"— ใบสำเนางานนำเสนอ:

1 vi ธวัชชัย เอี่ยมไพโรจน์

2 เรื่องทั่วๆไปของ vi ถ้าเป็น server ที่ใช้ร่วมกันหลายๆคน อย่าง น้อยจะต้องมี vi และ emacs ไว้ให้ใช้ vi commands มีมากมาย แต่ที่ใช้บ่อยมัไม่ มากนัก vi พัฒนาขึ้นที่ UC Berkeley โดย Bill Joy ภายใต้ BSD รุ่นแรกๆ โปรดดูที่ –http://www.techfak.uni- bielefeld.de/~joern/jargon/vi.HTML

3 vi Fundamentals vi มี 3 modes –Command Mode –Input Mode –Line Mode ตัวอย่างการเปิด file –vi file.c แป้น Esc จะกลับสู่ command mode เสมอ

4 Input commands i --> insert – เริ่มพิมพ์ได้ ณ ตำแหน่งของ cursor ปัจจุบัน a --> append – เริ่มพิมพ์ได้ ณ ตำแหน่งที่อยู่ถัดออกไปจาก cursor ปัจจุบัน 1 ตำแหน่ง o --> open – เพิ่มบรรทัดใหม่และเปลี่ยนเป็น insert mode

5 Commands in command mode ที่ควรทราบ :wwrite :wqwrite then quit :qquit :w!Force a write :wq!Force a write then quit :q!Force a quit :e!Re-edit a file

6 Move cursor ใน file: ใช้ลูกศร เลื่อน หรือ h --> leftmove the cursor left j --> downmove the cursor down k -->upmove the cursor up l --> rightmove the cursor right (number)g --> goto specific line number 0 --> beginning of line $ --> end of line

7 Cut Copy Paste yy --> copy (yank) -- copies the current line (number)yy --> copies the (number) line dd --> cut (delete) -- cuts the current line (number)dd --> cuts the (number) lines dw --> delete word -- cuts the word pointed to by the cursor x --> delete character -- deletes the current character D --> delete to the end of line p --> paste (put) -- paste what is in the clipboard

8 Other commands. --> repeate last command u --> undo cw --> change word -- do dw then insert r(char) --> replace the character under the cusor

9 Movement commands 0 --> beginning of the current line. $ --> end of the current line. b --> move to the beginning of the current word. w --> move to the beginning of the next word. e --> move to the end of the current word.

10 Search commands /(characters) --> searches the file, from the current line, for the characters specified. (Search to the end of file). ?(characters) --> same but searches from current line to the top of file.

11 Display commands ^f -- ctrl-f --> page forward. ^b -- ctrl b --> page backward ~ --> changes the case of the character under the cursor. ^v(char) --> use for insert special meaning character.

12 Advanced Features :.,$s/hi/lo/g.,$ --> from current line to the end of file. s --> substitute (search and replace). /g --> global -- all “hi” to “lo” in file.


ดาวน์โหลด ppt Vi ธวัชชัย เอี่ยมไพโรจน์. เรื่องทั่วๆไปของ vi ถ้าเป็น server ที่ใช้ร่วมกันหลายๆคน อย่าง น้อยจะต้องมี vi และ emacs ไว้ให้ใช้ vi commands มีมากมาย แต่ที่ใช้บ่อยมัไม่

งานนำเสนอที่คล้ายกัน


Ads by Google