1 / 8

Vi IMproved

Vi IMproved. Quick guide to vim editor netj@sparcs.kaist.ac.kr. What ’ s vim?. Improved version of Vi editor vim = Vi IMproved Popular file editor in UNIX world Available for many OS. Getting Started. Run “ vi [filename] ” from your shell. Moving Cursor h : left j : down k : up

kylee
Download Presentation

Vi IMproved

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. Vi IMproved Quick guide to vim editor netj@sparcs.kaist.ac.kr

  2. What’s vim? • Improved version of Vi editor • vim = Vi IMproved • Popular file editor in UNIX world • Available for many OS

  3. Getting Started • Run “vi [filename]” from your shell

  4. Moving Cursor h : left j : down k : up l : right H : top L : bottom 0 : begin of line $ : end of line W, w : next word Input Mode a : append A : append at end i : insert I : insert at begin o : append line O : insert line R : replace mode [ESC] : exit input mode Basic Commands

  5. Moving Cursor #2 gg : first line of file G : last line of file ^F : next page ^B : previous page ^D : next halfpage ^U : prev halfpage :<n> : goto line #<n> <n>[ENTR] : go down #<n> lines B, b : begin of word E, e : end of word Working with Screen v : visual V : visual line ^V : visual block ^E : scroll down ^Y : scroll up Job Control u : undo U : undo job ^R : redo Basic Commands #2

  6. c<dir> : change <dir> C : change line Copy & Paste Y : copy line y<dir> : copy <dir> p : append paste P : insert paste Basic Commands #3 Delete & Insert • x : delete a char. • X : delete back char. • D : delete to EOL • dd : delete a line • r : replace a letter • s : delete a character and insert • S : delete a line and insert

  7. Search & Substitute :s/<exp1>/<exp2>/ : substitute <exp1> with <exp2> /<exp>, :/<exp> : search <exp> forward ?<exp>, :?<exp> : search <exp> back n : next match N : previous match Write & Read :w : write file :e : edit file :q : quit vim :wq : write & quit ZZ : write & quit :x : write & quit :r : read file Basic Commands #4

  8. More Information • man vim • :help in vim • Vim Website • http://www.vim.org

More Related