1 / 22

Vim 을 홍보합니다

Vim 을 홍보합니다. 서재백 mazorro@sparcs.org. E ditor. E ditor war. Vim. Emacs. larger set of features than vi Elips plugin Special editing modes Ability to emulate Vi. Small size Faster than Emacs Runs on all systems that has standard C library More users than Emacs. What is Vim?.

ace
Download Presentation

Vim 을 홍보합니다

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. Vim을 홍보합니다 서재백 mazorro@sparcs.org

  2. Editor

  3. Editor war Vim Emacs larger set of features than vi Elips plugin Special editing modes Ability to emulate Vi • Small size • Faster than Emacs • Runs on all systems that has standard C library • More users than Emacs

  4. What is Vim? • Vim Stands for Vi iMproved released by Bram Moolenaar in 1991 from Vi written by Bill Joy in 1976

  5. Simple Vim $ vi helloworld.c i#include<stdio.h><ESC>oint main(){<ESC>oprintf(“hellowolrd\n”);<ESC>oreturn 0; <ESC>o}<ESC><Ctl+z> $ gcchelloworld.c $ ./a.out

  6. h j k l 0 ^ $ // 이동 a io A I // 편집 u Ctl+r // Do & Undo * # /asdf n N // Searching Alt+vCtl+vShift+v // Select :<,>s/asdf/hello/g // 치환 Ctl+p // 자동완성 Ctl+sCtl+q // Lock & Unlock $ vimtutor

  7. Advanced Vim We can combinetwo or morecommands w dwcwywe de ceyefXdfXcfXyfX// X가 나올 때까지tXdtXctXytX// X가 나오기 직전까지$ d$ c$ y$ // 줄 끝까지j djcjyj// 현재 &다음 줄까지 10i<ESC>hello<CR><ESC>

  8. Advaned Vim(세미나 후 보충) d // delete c // delete f // find // and y // copy // insert p // paste o // newline w // word // and e // word(end) // insert b // word(before)

  9. Advanced Vim dab cab yab 커서가 포함된 괄호 시작부터 괄호 끝까지 dib cibyib 현재 커서가 포함된 괄호 시작 다음부터 괄호 끝 직전까지. 괄호는 포함하지 않음 ddcc yy// 현재 줄만

  10. Replacement :(range)s/(regular expression)/(something)/g :<,>s/^.*int/char/g :5,10s/<br>$/;/g :%s/<div\(.\{-}\)class=\(.\{-}\)>/<div\1class=“\2”>/g

  11. Regular Expression ^ 문장의 맨 앞 $ 문장의 맨 뒤 . 임의의 한 character [0-9] 0~9 또는 a~z또는 A~Z 한 개 [A-Z] [a-z]

  12. Regular Expression(세미나 후 보충) * //문자 반복 Ex. 1* 11..1 2* 22..2 a* aa..a .* // 임의의 문자 반복 \{-} //문자 최소 반복 \{+} //문자 최대 반복 Ex. 1\{-} a\{+} .\{-}

  13. Regular Expression .* character 반복 \(<RE>\)grouping :<,>s/<div\(.\{-}\)class=\(.\{-}\)>/<div\1class=“\2”>/g

  14. Macro $ vi macro_sample i1.<ESC>qayyp<Ctl+a>q98@a q<reg>(some macro)q //macro 저장 @<reg> @@ q: q/ //macro 실행 :reg“kp //register 보기 “5p //5번 register paste

  15. Split :sp // 수평 자르기 :vsp or :vs // 수직 자르기 Ctl+whCtl+wjCtl+wkCtl+wl // 이동 Ctl+w- Ctl+w+ // 창 크기 늘리기 Ctl+w_ // 현재창 세로로 최대화 Ctl+= // window size 동일하게 Ctl+rCtl+R //window rotate

  16. Tab $ vim-p a.txt b.txt c.txt $ vim -p3 :tabnewd.txt :tabp :tabn :tabfirst or :tabfir:tablast or :tabla Set vimrc!! map sn :tabn<CR> map sp:tabp<CR>

  17. Vim Shell There is :!(command) .. but

  18. Vim Shell Shell on Vim http://code.google.com/p/conque/ Setting Vimrc such as mapsh:vs<CR>:ConqueTerm bash<CR>

  19. Folding

  20. Folding Select range by Shift+vandtypezf zf //지정된 영역 folding zo or zO //folding open zc or zC //folding close zr or zR //folding all open zm or zM //folding all close zd //folding delete

  21. Folding(세미나 후 보충) zjzk //이전, 다음 folding으로 이동 :set method=indent // indentation (들여쓰기) 단위로 자동 folding :mkview:loadview//Save and Load

  22. Epilogue 더 알고 싶었던 것 Vimscript 도와주신 분들 강성훈 회원님 조동현 회원님 다른 여러 선배님들

More Related