PK qhYî¶JßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /proc/thread-self/root/proc/self/root/proc/self/root/usr/share/vim/vim80/tutor/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : //proc/thread-self/root/proc/self/root/proc/self/root/usr/share/vim/vim80/tutor/tutor.ja.utf-8 |
=============================================================================== = V I M æ æ¬ (ãã¥ãŒããªã¢ã«) ãž ã ã ã ã - Version 1.7 = =============================================================================== Vim ã¯ããã®ãã¥ãŒããªã¢ã«ã§èª¬æããã«ã¯å€ãããçšã®ã³ãã³ããåããéåžž ã«åŒ·åãªãšãã£ã¿ãŒã§ãããã®ãã¥ãŒããªã¢ã«ã¯ãããªãã Vim ãäžèœãšã㣠ã¿ãŒãšããŠäœ¿ãããªããããã«ãªãã®ã«ååãªã³ãã³ãã«ã€ããŠèª¬æããããã ã«ãªã£ãŠããŸãã ãã¥ãŒããªã¢ã«ãå®äºããã®ã«å¿ èŠãªæéã¯ãèŠããã³ãã³ããè©Šãã®ã«ã©ãã ãæéã䜿ãã®ãã«ããããŸãããããã25ãã30åã§ãã ATTENTION: 以äžã®ç·Žç¿çšã³ãã³ãã«ã¯ãã®æç« ãå€æŽãããã®ããããŸããç·Žç¿ãå§ããå ã«ã³ããŒãäœæããŸããã("vimtutor"ãããªãã°ãæ¢ã«ã³ããŒãããŠããŸã)ã ãã®ãã¥ãŒããªã¢ã«ãã䜿ãããšã§èŠããããä»çµã¿ã«ãªã£ãŠããããšããå¿ã ãŠãããªããã°ãªããŸãããæ£ããåŠç¿ããã«ã¯ã³ãã³ããå®éã«è©Šããªããã° ãªããªãã®ã§ããæç« ãèªãã ã ããªãã°ããã£ãšå¿ããŠããŸããŸã! ãããCapsããã¯(Shift-Lock)ããŒãæŒãããŠããªãããšã確èªããåŸãç»é¢ã« ã¬ãã¹ã³1.1 ãå šéšè¡šç€ºããããšãããŸã§ãj ããŒãæŒããŠã«ãŒãœã«ã移åã㟠ãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 1.1: ã«ãŒãœã«ã®ç§»å ** ã«ãŒãœã«ã移åããã«ã¯ã瀺ãããæ§ã« h,j,k,l ãæŒããŸã ** ^ k ãã³ã: h ããŒã¯å·Šæ¹åã«ç§»åããŸãã < h l > l ããŒã¯å³æ¹åã«ç§»åããŸãã j j ããŒã¯äžç¢å°ããŒã®ãããªããŒã§ãã v 1. 移åã«æ £ãããŸã§ãã¹ã¯ãªãŒã³ã§ã«ãŒãœã«ç§»åãããŸãããã 2. äžãžã®ããŒ(j)ãæŒãã€ã¥ãããšãé£ç¶ããŠç§»åã§ããŸãã ããã§æ¬¡ã®ã¬ãã¹ã³ã«ç§»åããæ¹æ³ãããããŸãããã 3. äžãžã®ããŒã䜿ã£ãŠãã¬ãã¹ã³1.2 ã«ç§»åããŸãããã NOTE: äœãã¿ã€ãããŠãããå€ããªããªã£ããã<ESC>ãæŒããŠããŒãã«ã¢ãŒãã«ã ãŸããããããå ¥åããããšããŠããã³ãã³ããåå ¥åããŸãããã NOTE: ã«ãŒãœã«ããŒã§ã移åã§ããŸããããã hjkl ã«äžåºŠæ £ããŠããŸãã°ãã¯ãã ã«éã移åããããšãã§ããã§ããããããããžã§! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 1.2: VIM ã®èµ·åãšçµäº !! NOTE: 以äžã®ããããã¹ããããè¡ãåã«ããã®ã¬ãã¹ã³ãèªã¿ãŸããã!! 1. <ESC>ããŒãæŒããŸãããã(確å®ã«ããŒãã«ã¢ãŒãã«ãããã) 2. 次ã®ããã«ã¿ã€ã: :q! <ENTER> ããã«ããç·šéããå 容ãä¿åããã«ãšãã£ã¿ãçµäºããŸãã 3. ãã®ãã¥ãŒããªã¢ã«ãå§ããçºã®ã³ãã³ããå®è¡ãããšãããã«æ»ããŸãã ãã®ã³ãã³ãã¯: vimtutor <ENTER> 4. ãããŸã§ã®ã¹ããããèŠãèªä¿¡ãã€ãããªãã°ãã¹ããã 1 ãã 3 ãŸã§ãå® éã«è©ŠããŠãVim ã1床çµäºããŠããåã³èµ·åããŸãããã NOTE: :q! <ENTER> ã¯å šãŠã®å€æŽãç Žæ£ããŸããã¬ãã¹ã³ã«ãŠå€æŽããã¡ã€ã«ã«ä¿ åããæ¹æ³ã«ã€ããŠãå匷ããŠãããŸãããã 5. 1.3ãŸã§ã«ãŒãœã«ã移åãããŸãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 1.3: ããã¹ãç·šé - åé€ ** ããŒãã«ã¢ãŒãã«ãŠã«ãŒãœã«ã®äžã®æåãåé€ããã«ã¯ x ãæŒããŸã ** 1. 以äžã® ---> ãšç€ºãããè¡ã«ã«ãŒãœã«ã移åããŸãããã 2. ééããä¿®æ£ããããã«ãåé€ããæåã®æåãŸã§ã«ãŒãœã«ã移åããŸãã 3. äžå¿ èŠãªæåã x ãæŒããŠåé€ããŸãããã 4. æãæ£ãããªããŸã§ ã¹ããã 2 ãã 4 ãç¹°ãè¿ããŸãããã ---> ãã® ãããã 㯠ã€ã€ãã ã ããããŠãŠ ãšã³ã¯ããã 5. è¡ãæ£ãããªã£ãããã¬ãã¹ã³ 1.4 ãžé²ã¿ãŸãããã NOTE: å šãŠã®ã¬ãã¹ã³ãéããŠãèŠããããšããã®ã§ã¯ãªãå®éã«ãã£ãŠã¿ãŸãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 1.4: ããã¹ãç·šé - æ¿å ¥ ** ããŒãã«ã¢ãŒãã«ãŠããã¹ããæ¿å ¥ããã«ã¯ i ãæŒããŸã ** 1. 以äžã® ---> ãšç€ºãããæåã®è¡ã«ã«ãŒãœã«ã移åããŸãããã 2. 1è¡ç®ã2è¡ç®ãšåãæ§ã«ããããã«ãããã¹ããæ¿å ¥ããªããã°ãªããªãäœçœ® ã®æ¬¡ã®æåã«ã«ãŒãœã«ã移åããŸãã 3. i ããŒãæŒããŠãããè¿œå ãå¿ èŠãªæåãã¿ã€ãããŸãããã 4. ééããä¿®æ£ããã <ESC> ãæŒããŠã³ãã³ãã¢ãŒãã«æ»ããæ£ããæã«ãªãæ§ ã«ã¹ããã 2 ãã 4 ãç¹°ãè¿ããŸãããã ---> ãã® ã«ã¯ 足ããªã ããã¹ã ããã ---> ãã® è¡ ã«ã¯ 幟ã€ã 足ããªã ããã¹ã ã ããã 5. æ¿å ¥ã®æ¹æ³ãããã£ããã¬ãã¹ã³ 1.5 ãžé²ã¿ãŸãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 1.5: ããã¹ãç·šé - è¿œå ** ããã¹ããè¿œå ããã«ã¯ A ãæŒããŸããã ** 1. 以äžã® ---> ãšç€ºãããæåã®è¡ã«ã«ãŒãœã«ã移åããŸãããã ã«ãŒãœã«ããã®æåäžã«ãã£ãŠãããŸããŸããã 2. è¿œå ãå¿ èŠãªå Žæ㧠A ãã¿ã€ãããŸãããã 3. ããã¹ããè¿œå ãçµãããã <ESC> ãæŒããŠããŒãã«ã¢ãŒãã«æ»ããŸãããã 4. 2è¡ç®ã® ---> ãšç€ºãããå Žæãžç§»åããã¹ããã 2 ãã 3 ãç¹°ãè¿ããŠææ³ ãä¿®æ£ããŸãããã ---> ããã«ã¯ééã£ãããã¹ãããã ããã«ã¯ééã£ãããã¹ãããããŸãã ---> ããã«ãééã£ãããã¹ ããã«ãééã£ãããã¹ãããããŸãã 5. ããã¹ãã®è¿œå ã軜快ã«ãªã£ãŠãããã¬ãã¹ã³ 1.6 ãžé²ã¿ãŸãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 1.6: ãã¡ã€ã«ã®ç·šé ** ãã¡ã€ã«ãä¿åããŠçµäºããã«ã¯ :wq ãšã¿ã€ãããŸã ** !! NOTE: 以äžã®ã¹ããããå®è¡ããåã«ããŸãå šäœãèªãã§ãã ãã!! 1. ã¬ãã¹ã³ 1.2 ã§ãã£ãããã« :q! ãã¿ã€ãããŠããã®ãã¥ãŒããªã¢ã«ãçµäº ããŸãããããã¯ãå¥ã®ç«¯æ«ãããå Žåã¯ããã§ä»¥äžã®å 容ãè¡ã£ãŠãããŸã ãŸããã 2. ã·ã§ã«ããã³ããã§ãã®ã³ãã³ããã¿ã€ãããŸã: vim tutor <ENTER> 'vim'ã Vim ãšãã£ã¿ãèµ·åããã³ãã³ãã'tutor' ã¯ç·šéããããã¡ã€ã«ã® ååã§ããå€æŽããŠããããã¡ã€ã«ã䜿ããŸãããã 3. åã®ã¬ãã¹ã³ã§åŠãã ããã«ãããã¹ããæ¿å ¥ãåé€ããŸãã 4. å€æŽããã¡ã€ã«ã«ä¿åããŸã: :wq <ENTER> 5. ã¹ããã 1 㧠vimtutuor ãçµäºããå Žå㯠vimtutor ãå床起åãã以äžã® èŠçŽãžé²ã¿ãŸãããã 6. 以äžã®ã¹ããããèªãã§ç解ããäžã§ãããå®è¡ããŸãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 1 èŠçŽ 1. ã«ãŒãœã«ã¯ç¢å°ããŒããã㯠hjkl ããŒã§ç§»åããŸãã h (å·Š) j (äž) k (äž) l (å³) 2. Vim ãèµ·åããã«ã¯ããã³ãããã vim ãã¡ã€ã«å <ENTER> ãšã¿ã€ãããŸãã 3. Vim ãçµäºããã«ã¯ <ESC> :q! <ENTER> ãšã¿ã€ãããŸã(å€æŽãç Žæ£)ã ããã㯠<ESC> :wq <ENTER> ãšã¿ã€ãããŸã(å€æŽãä¿å)ã 4. ã«ãŒãœã«ã®äžã®æåãåé€ããã«ã¯ãããŒãã«ã¢ãŒã㧠x ãšã¿ã€ãããŸãã 5. ã«ãŒãœã«ã®äœçœ®ã«æåãæ¿å ¥ããã«ã¯ãããŒãã«ã¢ãŒã㧠i ãšã¿ã€ãããŸãã i ããã¹ãã®ã¿ã€ã <ESC> ã«ãŒãœã«äœçœ®ã«è¿œå A ããã¹ãã®è¿œå <ESC> è¡æ«ã«è¿œå NOTE: <ESC> ããŒãæŒããšããŒãã«ã¢ãŒãã«ç§»è¡ããŸãããã®éãééã£ããå ¥åé äžã®ã³ãã³ããåãæ¶ãããšãã§ããŸãã ããŠãç¶ããŠã¬ãã¹ã³ 2 ãå§ããŸãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 2.1: åé€ã³ãã³ã ** åèªã®æ«å°ŸãŸã§ãåé€ããã«ã¯ dw ãšã¿ã€ãããŸããã ** 1. ããŒãã«ã¢ãŒãã§ããããšã確èªããããã« <ESC> ãæŒããŸãããã 2. 以äžã® ---> ãšç€ºãããè¡ã«ã«ãŒãœã«ã移åããŸãããã 3. æ¶ãããåèªã®å é ã«ã«ãŒãœã«ã移åããŸãããã 4. åèªãåé€ããããã« dw ãšã¿ã€ãããŸãããã NOTE: ã¿ã€ããããšãdw ãšããæåãã¹ã¯ãªãŒã³ã®æäžè¡ã«çŸãããŸãã ã¿ã€ããééã£ãŠããŸã£ãæã«ã¯ <ESC> ãæŒããŠããçŽããŸãããã ---> ãã® æ çŽ ã«ã¯ ããã€ãã® ãã®ãã å¿ èŠã®ãªã åèª ã å«ãŸã㊠ããŸãã 5. 3 ãã 4 ãŸã§ãæãæ£ãããªããŸã§ç¹°ãè¿ããã¬ãã¹ã³ 2.2 ãžé²ã¿ãŸãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 2.2: ãã®ä»ã®åé€ã³ãã³ã ** è¡ã®æ«å°ŸãŸã§ãåé€ããã«ã¯ d$ ãšã¿ã€ãããŸããã ** 1. ããŒãã«ã¢ãŒãã§ããããšã確èªããã®ã« <ESC> ãæŒããŸãããã 2. 以äžã® ---> ãšç€ºãããè¡ã«ã«ãŒãœã«ã移åããŸãããã 3. æ£ããæã®æ«å°Ÿãžã«ãŒãœã«ã移åããŸããã(æåã® ã ã®åŸã§ã)ã 4. è¡æ«ãŸã§åé€ããã®ã« d$ ãšã¿ã€ãããŸãããã ---> 誰ãããã®è¡ã®æåŸã2床ã¿ã€ãããŸããã 2床ã¿ã€ãããŸããã 5. ã©ãããããšãç解ããããã«ãã¬ãã¹ã³ 2.3 ãžé²ã¿ãŸãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 2.3: ãªãã¬ãŒã¿ãšã¢ãŒã·ã§ã³ å€ãã®ã³ãã³ãã¯ãªãã¬ãŒã¿ãšã¢ãŒã·ã§ã³ããããã¹ãã«å€æŽãå ããŸãã åé€ã³ãã³ã d ã®ãªãã¬ãŒã¿ã¯æ¬¡ã®æ§ã«ãªã£ãŠããŸã: d ã¢ãŒã·ã§ã³ ãããã: d - åé€ã³ãã³ãã ã¢ãŒã·ã§ã³ - äœã«å¯ŸããŠåããããã(以äžã«æããŸã)ã ã¢ãŒã·ã§ã³äžèŠ§ã®äžéš: w - ã«ãŒãœã«äœçœ®ãã空çœãå«ãåèªã®æ«å°ŸãŸã§ã e - ã«ãŒãœã«äœçœ®ãã空çœãå«ãŸãªãåèªã®æ«å°ŸãŸã§ã $ - ã«ãŒãœã«äœçœ®ããè¡æ«ãŸã§ã ã€ãŸã de ãšã¿ã€ããããšãã«ãŒãœã«äœçœ®ããåèªã®çµãããŸã§ãåé€ããŸãã NOTE: åéºããã人ã¯ãããŒãã«ã¢ãŒãã«ãŠã³ãã³ããªãã«ã¢ãŒã·ã§ã³ãæŒã㊠ã¿ãŸããããã«ãŒãœã«ãç®çèªäžèŠ§ã§ç€ºãããäœçœ®ã«ç§»åããã¯ãã§ãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 2.4: ã¢ãŒã·ã§ã³ã«ã«ãŠã³ãã䜿çšãã ** äœåãè¡ãããç¹°ãè¿ãã®ã¢ãŒã·ã§ã³ã®åã«æ°å€ãã¿ã€ãããŸãã ** 1. 以äžã® ---> ãšç€ºãããè¡ã®å é ã«ã«ãŒãœã«ã移åããŸãã 2. 2w ãã¿ã€ãããŠåèª2ã€ååã«ç§»åããŸãã 3. 3e ãã¿ã€ãããŠ3ã€ç®ã®åèªã®çµç«¯ã«ç§»åããŸãã 4. 0 (ãŒã)ãã¿ã€ãããŠè¡é ã«ç§»åããŸãã 5. ã¹ããã 2 ãš 3 ãéãæ°å€ã䜿ã£ãŠç¹°ãè¿ããŸãã ---> This is just a line with words you can move around in. 6. ã¬ãã¹ã³ 2.5 ã«é²ã¿ãŸãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 2.5: ããå€ããåé€ããããã«ã«ãŠã³ãã䜿çšãã ** ãªãã¬ãŒã¿ãšã«ãŠã³ããã¿ã€ããããšããã®æäœãè€æ°åç¹°ãè¿ãããŸãã ** æ¢è¿°ã®åé€ã®ãªãã¬ãŒã¿ãšã¢ãŒã·ã§ã³ã®çµã¿åããã«ã«ãŠã³ããè¿œå ããããšã§ã ããå€ãã®åé€ãè¡ããŸã: d æ°å€ ã¢ãŒã·ã§ã³ 1. ---> ãšç€ºãããè¡ã®è¡é éšåã«ã«ãŒãœã«ã移åããŸãããã 2. UPPER CASE ã®åèª2ã€ã d2w ãšã¿ã€ãããŠåé€ããŸãã 3. UPPER CASE ãšããé£ç¶ããåèªãã1ã€ã®ã³ãã³ããšç°ãªãã«ãŠã³ããæå®ãã ã¹ããã 1 ãš 2 ãç¹°ãè¿ããŸãã ---> ãã®ABC DEè¡ã®FGHI JK LMN OPåèªã¯Q RS TUV綺éºã«ãªã£ãã NOTE: ãªãã¬ãŒã¿ d ãšã¢ãŒã·ã§ã³ã®éã«ã«ãŠã³ãã䜿ã£ãå Žåããªãã¬ãŒã¿ã®ãªã å Žåã®ã¢ãŒã·ã§ã³ã®ããã«åäœããŸãã äŸ: 3dw ãš d3w ã¯åçã§ã3w ãåé€ããŸãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 2.6: è¡ã®æäœ ** è¡å šäœãåé€ããã«ã¯ dd ãšã¿ã€ãããŸã ** è¡å šäœãåé€ããé »åºŠãå€ãã®ã§ãViã®ãã¶ã€ããŒã¯è¡ã®åé€ã d ã®2åã¿ã€ããš ããç°¡åãªãã®ã«æ±ºããŸããã 1. 以äžã®å¥ã®2è¡ç®ã«ã«ãŒãœã«ã移åããŸãã 2. dd ãšã¿ã€ãããŠè¡ãåé€ããŸãã 3. ããã«4è¡ç®ã«ç§»åããŸãã 4. 2dd ãšã¿ã€ãããŠ2è¡ãåé€ããŸãã ---> 1) ãã©ã¯èµ€ãã ---> 2) ã€ãŸããªããã®ã¯æ¥œããã ---> 3) ã¹ãã¬ã¯éãã ---> 4) ç§ã¯è»ããã£ãŠããã ---> 5) æèšãæå»ãåããã ---> 6) ç ç³ã¯çã ---> 7) ãªããšã¢ã㌠~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 2.7: ããçŽãã³ãã³ã ** æåŸã®ã³ãã³ããåãæ¶ãã«ã¯ u ãæŒããŸããU ã¯è¡å šäœã®åæ¶ã§ãã ** 1. 以äžã® ---> ãšç€ºãããè¡ã«ã«ãŒãœã«ã移åããæåã®ééãã«ã«ãŒãœã« ã移åããŸãããã 2. x ãã¿ã€ãããŠãããªãå é ã®æåãåé€ããŸãããã 3. ãããu ãã¿ã€ãããŠæåŸã«å®è¡ããã³ãã³ããåãæ¶ããŸãããã 4. ä»åºŠã¯ãx ã䜿çšããŠèª€ããå šãŠä¿®æ£ããŸãããã 5. 倧æåã® U ãã¿ã€ãããŠãè¡ãå ã®ç¶æ ã«æ»ããŸãããã 6. u ãã¿ã€ãããŠçŽåã® U ã³ãã³ããåæ¶ããŸãããã 7. ã§ã¯ã³ãã³ããåå®è¡ããã®ã« CTRL-R (CTRL ãæŒãããŸãŸ R ãæã€)ãæ°å ã¿ã€ãããŠã¿ãŸããã(åæ¶ã®åæ¶)ã ---> ãã®ã®è¡ã®ã®ééããä¿®æ£ã ããåŸã§ãããã®ä¿®æ£ããåæ¶ããŸãŸããã 8. ããã¯ãšãŠã䟿å©ãªã³ãã³ãã§ããããã¬ãã¹ã³ 2 èŠçŽãžé²ã¿ãŸãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 2 èŠçŽ 1. ã«ãŒãœã«äœçœ®ããåèªã®æ«å°ŸãŸã§ãåé€ããã«ã¯ dw ãšã¿ã€ãããŸãã 2. ã«ãŒãœã«äœçœ®ããè¡ã®æ«å°ŸãŸã§ãåé€ããã«ã¯ d$ ãšã¿ã€ãããŸãã 3. è¡å šäœãåé€ããã«ã¯ dd ãšã¿ã€ãããŸãã 4. ã¢ãŒã·ã§ã³ãç¹°ãè¿ãã«ã¯æ°å€ãä»äžããŸã: 2w 5. å€æŽã«çšããã³ãã³ãã®åœ¢åŒã¯ ãªãã¬ãŒã¿ [æ°å€] ã¢ãŒã·ã§ã³ ãããã: ãªãã¬ãŒã¿ - åé€ d ã®é¡ã§äœããããã æ°å€ - ãã®ã³ãã³ããäœåç¹°ãè¿ããã ã¢ãŒã·ã§ã³ - w (åèª)ã $ (è¡æ«)ãªã©ã®é¡ã§ãããã¹ãã®äœã«å¯ŸããŠåãã ãããã 6. è¡ã®å é ã«ç§»åããã«ã¯ãŒãã䜿çšããŸã: 0 7. ååã®åäœãåæ¶ã: u (å°æå u) è¡å šäœã®å€æŽãåæ¶ã: U (倧æå U) åæ¶ãã®åæ¶ã: CTRL-R ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 3.1: 貌ãä»ãã³ãã³ã ** æåŸã«åé€ãããè¡ãã«ãŒãœã«ã®åŸã«è²Œãä»ããã«ã¯ p ãã¿ã€ãããŸã ** 1. 以äžã®æ®µèœã®æåã®è¡ã«ã«ãŒãœã«ã移åããŸãããã 2. dd ãšã¿ã€ãããŠè¡ãåé€ããVim ã®ãããã¡ã«æ ŒçŽããŸãããã 3. åé€ããè¡ãæ¬æ¥ããã¹ãäœçœ®ã®äžã®è¡ãŸã§ãã«ãŒãœã«ã移åãããŸãããã 4. ããŒãã«ã¢ãŒã㧠p ãã¿ã€ãããŠæ ŒçŽããè¡ãç»é¢ã«æ»ããŸãã 5. é çªãæ£ãããªãæ§ã«ã¹ããã 2 ãã 4 ãç¹°ãè¿ããŸãããã d) 貎æ¹ãåŠã¶ããšãã§ãã? b) ã¹ãã¬ã¯éãã c) ç¥æµãšã¯åŠã¶ãã®ã a) ãã©ã¯èµ€ãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 3.2: 眮ãæãã³ãã³ã ** ã«ãŒãœã«ã®äžã®æåã眮ãæããã«ã¯ r ãã¿ã€ãããŸã ** 1. 以äžã® ---> ãšç€ºãããæåã®è¡ã«ã«ãŒãœã«ã移åããŸãããã 2. æåã®ééãã®å é ã«ã«ãŒãœã«ã移åããŸãããã 3. r ãšã¿ã€ãããééã£ãŠããæåã眮ãæãããæ£ããæåãã¿ã€ãããŸãããã 4. æåã®è¡ãæ£ãããªããŸã§ã¹ããã 2 ãã 3 ãç¹°ãè¿ããŸãããã ---> ãã®åã人åããæãããã®äººã¯å¹Ÿã€ãåéã£ãããŒãæŒãããã! ---> ãã®è¡ãå ¥åããæã«ããã®äººã¯å¹Ÿã€ãééã£ãããŒãæŒããŸãã! 5. ãããã¬ãã¹ã³ 3.3 ãžé²ã¿ãŸãããã NOTE: å®éã«è©ŠããŸãããã決ããŠèŠããã ãã«ã¯ããªãããšã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 3.3: å€æŽã³ãã³ã ** åèªã®äžéšããããã¯å šäœãå€æŽããã«ã¯ cw ãšã¿ã€ãããŸã ** 1. 以äžã® ---> ãšç€ºãããæåã®è¡ã«ã«ãŒãœã«ã移åããŸãããã 2. lubw ã® u ã®äœçœ®ã«ã«ãŒãœã«ã移åããŸãããã 3. cw ãšã¿ã€ãããæ£ããåèªãã¿ã€ãããŸããã(ãã®å Žå 'ine' ãšã¿ã€ã)ã 4. 次ã®ééã(å€æŽãã¹ãæåã®å é )ã«ç§»åããããã« <ESC> ãã¿ã€ãããŸãã 5. æåã®è¡ã次ã®è¡ã®æ§ã«ãªããŸã§ã¹ããã 3 ãš 4 ãç¹°ãè¿ããŸãã ---> This lubw has a few wptfd that mrrf changing usf the change operator. ---> This line has a few words that need changing using the change operator. cw ã¯åèªãå€æŽããã ãã§ãªããæ¿å ¥ãè¡ããããšã«æ³šæããŸãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 3.4: c ã䜿çšãããã®ä»ã®å€æŽ ** å€æŽã³ãã³ãã¯ãåé€ã³ãã³ããšåãæ§ã«ãªããžã§ã¯ãã䜿çšããŸã ** 1. å€æŽã³ãã³ãã¯ãåé€ã³ãã³ããšåããããªåäœãããŸãããã®åœ¢åŒã¯ c [æ°å€] ã¢ãŒã·ã§ã³ 2. ãªããžã§ã¯ããåãã§ãw ã¯åèªã $ ã¯è¡æ«ãªã©ãšãã£ããã®ã§ãã 3. 以äžã® ---> ãšç€ºãããè¡ã«ã«ãŒãœã«ã移åããŸãããã 4. æåã®ééããžã«ãŒãœã«ã移åããŸãããã 5. c$ ãšã¿ã€ãããŠè¡ã®æ®ããïŒè¡ç®ã®æ§ã«ãã<ESC> ãæŒããŸãããã ---> The end of this line needs some help to make it like the second. ---> The end of this line needs to be corrected using the c$ command. NOTE: ã¿ã€ãäžã®ééãã¯ããã¯ã¹ããŒã¹ããŒã䜿ã£ãŠçŽãããšãã§ããŸãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 3 èŠçŽ 1. æ¢ã«åé€ãããããã¹ããåé 眮ããã«ã¯ãp ãã¿ã€ãããŸããããã¯åé€ã ããããã¹ããã«ãŒãœã«ã®åŸã«æ¿å ¥ããŸã(è¡åäœã§åé€ãããã®ãªãã°ãã«ãŒ ãœã«ã®ãã次ã®è¡ã«æ¿å ¥ãããŸã)ã 2. ã«ãŒãœã«ã®äžã®æåã眮ãæããã«ã¯ãr ãã¿ã€ãããåŸãããã眮ãæãã æåãã¿ã€ãããŸãã 3. å€æŽã³ãã³ãã§ã¯ã«ãŒãœã«äœçœ®ããç¹å®ã®ã¢ãŒã·ã§ã³ã§æå®ãããçµç«¯ãŸã§ãå€ æŽããããšãå¯èœã§ããäŸãã° cw ãªãã°ã«ãŒãœã«äœçœ®ããåèªã®çµãããŸã§ã c$ ãªãã°è¡ã®çµãããŸã§ãå€æŽããŸãã 4. å€æŽã³ãã³ãã®åœ¢åŒã¯ c [æ°å€] ã¢ãŒã·ã§ã³ ããã次ã®ã¬ãã¹ã³ãžé²ã¿ãŸãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 4.1: äœçœ®ãšãã¡ã€ã«ã®æ å ± ** ãã¡ã€ã«å ã§ã®äœçœ®ãšãã¡ã€ã«ã®ç¶æ ã衚瀺ããã«ã¯ CTRL-G ãã¿ã€ãããŸãã ãã¡ã€ã«å ã®ããè¡ã«ç§»åããã«ã¯ G ãã¿ã€ãããŸã ** NOTE: ã¹ããããå®è¡ããåã«ããã®ã¬ãã¹ã³å šãŠã«ç®ãéããŸããã!! 1. CTRL ãæŒãããŸãŸ g ãæŒããŸãããããã®æäœã CTRL-G ãšåŒãã§ããŸãã ããŒãžã®äžçªäžã«ãã¡ã€ã«åãšè¡çªå·ã衚瀺ãããã¯ãã§ãã ã¹ããã 3ã®ãã ã«è¡çªå·ãèŠããŠãããŸãããã NOTE: ç»é¢ã®å³äžé ã«ã«ãŒãœã«ã®äœçœ®ã衚瀺ãããŠãããããããŸããããã㯠'ruler' ãªãã·ã§ã³(:help 'ruler' ãåç §)ãèšå®ããããšã§è¡šç€ºãããŸãã 2. æäžè¡ã«ç§»åããããã« G ãã¿ã€ãããŸãããã ãã¡ã€ã«ã®å é ã«ç§»åããã«ã¯ gg ãšã¿ã€ãããŸãããã 3. å ã»ã©ã®è¡ã®çªå·ãã¿ã€ãã G ãã¿ã€ãããŸããããæåã« CTRL-G ãæŒããè¡ ã«æ»ã£ãŠæ¥ãã¯ãã§ãã 4. èªä¿¡ãæãŠããã¹ããã 1 ãã 3 ãå®è¡ããŸãããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 4.2: æ€çŽ¢ã³ãã³ã ** èªå¥ãæ€çŽ¢ããã«ã¯ / ãšãåæ¹æ€çŽ¢ããèªå¥ãã¿ã€ãããŸãã** 1. ããŒãã«ã¢ãŒã㧠/ ãšããæåãã¿ã€ãããŸããç»é¢äžçªäžã« : ã³ãã³ããš åãæ§ã« / ãçŸããããšã«æ°ã¥ãã§ãããã 2. ã§ã¯ã'errroor' <ENTER> ãšã¿ã€ãããŸãããããããæ€çŽ¢ãããåèªã§ãã 3. åãèªãããäžåºŠæ€çŽ¢ãããšã㯠åã« n ãã¿ã€ãããŸãã éæ¹åã«èªå¥ãæ€çŽ¢ãããšã㯠N ãã¿ã€ãããŸãã 4. éæ¹åã«èªå¥ãæ€çŽ¢ããå Žåã¯ã/ ã®ä»£ããã« ? ã³ãã³ãã䜿çšããŸãã 5. å ã®å Žæã«æ»ãã«ã¯ CTRL-O (Ctrl ãæŒãç¶ããªãã o æåã¿ã€ã)ãã¿ã€ãã ãŸããããã«æ»ãã«ã¯ãããç¹°ãè¿ããŸããCTRL-I ã¯åæ¹åã§ãã ---> "errroor" 㯠error ãšã¹ãã«ãéããŸã; errroor ã¯ãããã error ã§ãã NOTE: æ€çŽ¢ããã¡ã€ã«ã®çµããã«éãããšããªãã·ã§ã³ 'wrapscan' ãèšå®ãããŠãã å Žåã¯ããã¡ã€ã«ã®å é ããæ€çŽ¢ãç¶è¡ããŸãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 4.3: 察å¿ããæ¬åŒ§ãæ€çŽ¢ ** 察å¿ãã ),] ã } ãæ€çŽ¢ããã«ã¯ % ãã¿ã€ãããŸã ** 1. äžã® ---> ã§ç€ºãããè¡ã§ (,[ ã { ã®ã©ããã«ã«ãŒãœã«ã移åããŸãããã 2. ãã㧠% ãšã¿ã€ãããŸãããã 3. ã«ãŒãœã«ã¯å¯Ÿå¿ããæ¬åŒ§ã«ç§»åããã¯ãã§ãã 4. æåã®æ¬åŒ§ã«ç§»åããã«ã¯ % ãšã¿ã€ãããŸãããã 5. ä»ã® (,),[,],{ ã } ã§ã«ãŒãœã«ã移åãã% ãäœãããŠããã確èªããŸãããã ---> This ( is a test line with ('s, ['s ] and {'s } in it. )) NOTE: ãã®æ©èœã¯æ¬åŒ§ãäžèŽããŠããªãããã°ã©ã ããããã°ããã®ã«ãšãŠã圹ç«ã¡ ãŸãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 4.4: ééããå€æŽããæ¹æ³ ** 'old' ã 'new' ã«çœ®æããã«ã¯ :s/old/new/g ãšã¿ã€ãããŸã ** 1. 以äžã® ---> ãšç€ºãããè¡ã«ã«ãŒãœã«ã移åããŸãããã 2. :s/thee/the <ENTER> ãšã¿ã€ãããŸãããããã®ã³ãã³ãã¯ãã®è¡ã§æåã«èŠ ã€ãã£ããã®ã«ã ãè¡ãªãããããšã«æ°ãã€ããŸãããã 3. ã§ã¯ :s/thee/the/g ãšã¿ã€ãããŸããããè¡å šäœã眮æããããšãæå³ããŸãã ãã®å€æŽã¯ãã®è¡ã§èŠã€ãã£ãå šãŠã®ç®æã«å¯ŸããŠè¡ãªãããŸãã ---> thee best time to see thee flowers is in thee spring. 4. è€æ°è¡ããèŠã€ããæåãå€æŽããã«ã¯ :#,#s/old/new/g #,# ã«ã¯çœ®ãæããç¯å²ã®éå§ãšçµäºã®è¡çªå·ãæå®ã㟠ãã :%s/old/new/g ãã¡ã€ã«å šäœã§èŠã€ãããã®ã«å¯ŸããŠå€æŽããã :%s/old/new/gc ãã¡ã€ã«å šäœã§èŠã€ãããã®ã«å¯ŸããŠã1ã€1ã€ç¢ºèªããšã㪠ããå€æŽããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 4 èŠçŽ 1. CTRL-G ã¯ãã¡ã€ã«ã§ã®äœçœ®ãšãã¡ã€ã«ã®è©³çŽ°ã衚瀺ããŸãã G ã¯ãã¡ã€ã«ã®æäžè¡ã«ç§»åããŸãã æ°å€ G ã¯ãã®è¡ã«ç§»åããŸãã gg ã¯å é è¡ã«ç§»åããŸãã 2. / ã®åŸã«èªå¥ãã¿ã€ããããšåæ¹ã«èªå¥ãæ€çŽ¢ããŸãã ? ã®åŸã«èªå¥ãã¿ã€ããããšåŸæ¹ã«èªå¥ãæ€çŽ¢ããŸãã æ€çŽ¢ã®åŸã® n ã¯åãæ¹åã®æ¬¡ã®æ€çŽ¢ããN ã¯éæ¹åã®æ€çŽ¢ãããŸãã CTRL-O ã¯å Žæãåã«ç§»ããCTRL-I ã¯å Žæã次ã«ç§»åããŸãã 3. (,),[,],{, ããã㯠} äžã«ã«ãŒãœã«ãããç¶æ 㧠% ãã¿ã€ããããšå¯Ÿã«ãªãæ åãžç§»åããŸãã 4. çŸåšè¡ã®æåã® old ã new ã«çœ®æããã :s/old/new çŸåšè¡ã®å šãŠã® old ã new ã«çœ®æããã :s/old/new/g 2ã€ã® # éã§èªå¥ã眮æããã :#,#s/old/new/g ãã¡ã€ã«ã®äžã®å šãŠã®æ€çŽ¢èªå¥ã眮æããã :%s/old/new/g 'c' ãå ãããšçœ®æã®åºŠã«ç¢ºèªãæ±ããã :%s/old/new/gc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 5.1: å€éšã³ãã³ããå®è¡ããæ¹æ³ ** :! ã®åŸã«å®è¡ããå€éšã³ãã³ããã¿ã€ãããŸã ** 1. ç»é¢ã®æäžéšã«ã«ãŒãœã«ã移åãããããæ £ã芪ããã : ãã¿ã€ãããŸãããã ããã§ã³ãã³ããã¿ã€ãã§ããæ§ã«ãªããŸãã 2. ãã㧠! ãšããæå(æå笊)ãã¿ã€ãããŸãããã ããã§å€éšã·ã§ã«ã³ãã³ããå®è¡ã§ããæ§ã«ãªããŸãã 3. äŸãšã㊠! ã«ç¶ã㊠ls ãšã¿ã€ãã <ENTER> ãæŒããŸãããã ã·ã§ã«ããã³ããã®ããã«ãã£ã¬ã¯ããªã®äžèŠ§ã衚瀺ãããã¯ãã§ãã ããã㯠ls ãåããªããªãã° :!dir ã䜿çšããŸãããã NOTE: ãã®æ¹æ³ã«ãã£ãŠããããã³ãã³ããå®è¡ããããšãã§ããŸãããã¡ããåŒæ° ãäžããããŸãã NOTE: å šãŠã® : ã³ãã³ã㯠<ENTER> ãæŒããŠçµäºããªããã°ãªããŸããã 以éã§ã¯ãã®ããšã«èšåããŸããã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 5.2: ãã®ä»ã®ãã¡ã€ã«ãžæžã蟌㿠** ãã¡ã€ã«ãžå€æŽãä¿åããã«ã¯ :w ãã¡ã€ã«å ãšã¿ã€ãããŸã ** 1. ãã£ã¬ã¯ããªã®äžèŠ§ãåŸãããã« :!dir ããã㯠:!ls ãšã¿ã€ãããŸãããã ãã®ããš <ENTER> ãæŒãã®ã¯æ¢ã«ãåç¥ã§ããã 2. TEST ã®ããã«ããã®ãã£ã¬ã¯ããªã«ç¡ããã¡ã€ã«åãäžã€éžã³ãŸãã 3. ã§ã¯ :w TEST ãšã¿ã€ãããŸããã (TEST ã¯ãéžãã ãã¡ã€ã«åã§ã)ã 4. ããã«ãããã¡ã€ã«å šäœã TEST ãšããååã§ä¿åãããŸãã ããäžåºŠ :!dir ããã㯠:!ls ãšã¿ã€ãããŠç¢ºèªããŠã¿ãŸãããã NOTE: ãã㧠Vim ãçµäºãããã¡ã€ã«å TEST ãšå ±ã«èµ·åãããšãä¿åããæã® ãã¥ãŒããªã¢ã«ã®è€è£œãã§ãäžããã¯ãã§ãã 5. ããã«ã次ã®ããã«ã¿ã€ãããŠãã¡ã€ã«ãæ¶ããŸããã(MS-DOS): :!del TEST ãããã¯(Unix): :!rm TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 5.3: éžæããæžã蟌㿠** ãã¡ã€ã«ã®äœçœ®ãä¿åããã«ã¯ãv ã¢ãŒã·ã§ã³ãš :w FILENAME ãã¿ã€ãããŸãã ** 1. ãã®è¡ã«ã«ãŒãœã«ã移åããŸãã 2. v ãæŒãã以äžã®ç¬¬5é ç®ã«ã«ãŒãœã«ã移åããŸããããã¹ãã匷調衚瀺ãããã® ã«æ³šç®ããŠäžããã 3. æå : ãæŒããšãç»é¢ã®æäžéšã« :'<,'> ãçŸããŸãã 4. w TEST (TEST ã¯ååšããªããã¡ã€ã«å)ãã¿ã€ãããŸãã <ENTER> ãæŒãåã« :'<,'>w TEST ãšãªã£ãŠããããšã確èªããŠäžããã 5. Vim 㯠TEST ãšãããã¡ã€ã«ã«éžæãããè¡ãæžã蟌ãã§ãããã !dir ããã㯠!ls ã§ããã確èªããŸãã ããã¯åé€ããªãã§ãããŠäžããã次ã®ã¬ãã¹ã³ã§äœ¿çšããŸãã NOTE: v ãæŒããšãVisual éžæãå§ãŸããŸããã«ãŒãœã«ãåããããšã§ãéžæç¯å²ã 倧ãããå°ãããã§ããŸããããã«ããã®éžæç¯å²ã«å¯ŸããŠãªãã¬ãŒã¿ãé©çš ããŸããäŸãã° d ã¯ããã¹ããåé€ããŸãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 5.4: ãã¡ã€ã«ã®å蟌ãšå䜵 ** ãã¡ã€ã«ã®äžèº«ãæ¿å ¥ããã«ã¯ :r ãã¡ã€ã«å ãšã¿ã€ãããŸã ** 1. ã«ãŒãœã«ã以äžã®è¡ã«åãããŸãã NOTE: ã¹ããã 2 ã®å®è¡åŸãã¬ãã¹ã³ 5.3 ã®ããã¹ããçŸããŸããäžã«äžãã£ãŠã ã®ã¬ãã¹ã³ã«ç§»åããŸãããã 2. ã§ã¯ TEST ãšãããã¡ã€ã«ã :r TEST ãšããã³ãã³ãã§èªã¿èŸŒã¿ãŸãããã ããã§ãã TEST ã¯äœ¿ããã¡ã€ã«ã®ååã®ããšã§ãã èªã¿èŸŒãŸãããã¡ã€ã«ã¯ãã«ãŒãœã«è¡ã®äžã«ãããŸãã 3. å蟌ãã ãã¡ã€ã«ã確èªããŠã¿ãŸããããã«ãŒãœã«ãæ»ããšãã¬ãã¹ã³5.3 ã® ãªãªãžãã«ãšãã¡ã€ã«ã«ãããã®ã®2ã€ãããããšãããããŸãã NOTE: å€éšã³ãã³ãã®åºåãèªã¿èŸŒãããšãåºæ¥ãŸããäŸãã°ã :r !ls 㯠ls ã³ãã³ãã®åºåãã«ãŒãœã«ä»¥äžã«èªã¿èŸŒã¿ãŸãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 5 èŠçŽ 1. :!command ã«ãã£ãŠ å€éšã³ãã³ããå®è¡ããŸãã ãã䜿ãäŸ: (MS-DOS) (Unix) :!dir :!ls - ãã£ã¬ã¯ããªå ã®äžèŠ§ãèŠãã :!del FILENAME :!rm FILENAME - ãã¡ã€ã«ãåé€ããã 2. :w ãã¡ã€ã«å ã«ãã£ãŠãã¡ã€ã«åãšãããã¡ã€ã«ããã£ã¹ã¯ã«æžã蟌ãŸããã 3. v ã¢ãŒã·ã§ã³ã§ :w FILENAME ãšãããšãããžã¥ã¢ã«éžæè¡ããã¡ã€ã«ã«ä¿åã ããã 4. :r ãã¡ã€ã«å ã«ãããã¡ã€ã«åãšãããã¡ã€ã«ããã£ã¹ã¯ããåã蟌ãŸãã ã«ãŒãœã«äœçœ®ã®äžã«æ¿å ¥ãããã 5. :r !dir 㯠dir ã³ãã³ãã®åºåãã«ãŒãœã«äœçœ®ä»¥äžã«èªã¿èŸŒãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 6.1: ãªãŒãã³ã³ãã³ã ** o ãã¿ã€ããããšãã«ãŒãœã«ã®äžã®è¡ãéããæ¿å ¥ã¢ãŒãã«å ¥ããŸã ** 1. 以äžã® ---> ãšç€ºãããè¡ã«ã«ãŒãœã«ã移åããŸãããã 2. o (å°æå) ãã¿ã€ãããŠãã«ãŒãœã«ã®äžã®è¡ãéããæ¿å ¥ã¢ãŒãã«å ¥ããŸãã 3. ããã«æ¿å ¥ã¢ãŒããçµäºããçºã« <ESC> ãã¿ã€ãããŸãã ---> o ãã¿ã€ããããšã«ãŒãœã«ã¯éããè¡ãžç§»åãæ¿å ¥ã¢ãŒãã«å ¥ããŸãã 4. ã«ãŒãœã«ã®äžã®è¡ã«æ¿å ¥ããã«ã¯ãå°æåã® o ã§ã¯ãªããåçŽã«å€§æåã® O ãã¿ã€ãããŸãã次ã®è¡ã§è©ŠããŠã¿ãŸãããã ---> ãã®è¡ã®äžãžæ¿å ¥ããã«ã¯ããã®è¡ãžã«ãŒãœã«ã眮ã㊠O ãã¿ã€ãããŸãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 6.2: è¿œå ã³ãã³ã ** ã«ãŒãœã«ã®æ¬¡ã®äœçœ®ããããã¹ããè¿œå ããã«ã¯ a ãšã¿ã€ãããŸã ** 1. ã«ãŒãœã«ã ---> ã§ç€ºãããè¡ãžç§»åããŸãããã 2. e ãæŒã㊠li ã®çµç«¯éšãŸã§ã«ãŒãœã«ã移åããŸãã 3. ã«ãŒãœã«ã®åŸãã«ããã¹ããè¿œå ããããã« a (å°æå) ãã¿ã€ãããŸãã 4. ãã®äžã®è¡ã®ãããªåèªã«å®æãããŸããæ¿å ¥ã¢ãŒããæããçºã« <ESC> ãæŒ ããŸãã 5. e ã䜿ã£ãŠæ¬¡ã®äžå®å šãªåèªãžç§»åããã¹ããã 3 ãš 4 ãç¹°ãè¿ããŸãã ---> This li will allow you to pract appendi text to a line. ---> This line will allow you to practice appending text to a line. NOTE: a, i ãš A ã¯åãæ¿å ¥ã¢ãŒããžç§»ããŸãããæåãæ¿å ¥ãããäœçœ®ã ããç°ãªã ãŸãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 6.3: ãã®ä»ã®çœ®ææ¹æ³ ** 1æå以äžã眮ãæããã«ã¯å€§æåã® R ãšã¿ã€ãããŸããã ** 1. 以äžã® ---> ãšç€ºãããè¡ã«ã«ãŒãœã«ã移åããŸããæåã® xxx ã®å é ã«ç§»åã ãŸãã 2. R ãæŒããŠã2è¡ç®ã®æ°å€ãã¿ã€ãããããšã§ãxxx ã眮æãããŸãã 3. 眮æã¢ãŒããæããã«ã¯ <ESC> ãæŒããŸããè¡ã®æ®ããå€æŽãããŠããªããŸãŸã« ãªãããšã«æ³šæããŠãã ããã 4. æ®ã£ã xxx ãã¹ããããç¹°ãè¿ããŠçœ®æããŸãããã ---> Adding 123 to xxx gives you xxx. ---> Adding 123 to 456 gives you 579. NOTE: 眮æã¢ãŒãã¯æ¿å ¥ã¢ãŒãã«äŒŒãŠããŸãããå šãŠã®ã¿ã€ããããæåã¯æ¢åã®æå ãåé€ããŸãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 6.4: ããã¹ãã®ã³ããŒãšããŒã¹ã ** ããã¹ãã®ã³ããŒã«ã¯ãªãã¬ãŒã¿ y ããããŒã¹ãã«ã¯ p ã䜿ããŸã ** 1. ---> ãšç€ºãããè¡ãžç§»åããã«ãŒãœã«ã "a)" ã®åŸã«çœ®ããŠãããŸãã 2. v ã§ããžã¥ã¢ã«ã¢ãŒããéå§ãã"first" ã®æåãŸã§ã«ãŒãœã«ã移åããŸãã 3. y ãã¿ã€ãããŠåŒ·èª¿è¡šç€ºãããããã¹ãã yank (ã³ããŒ)ããŸãã 4. 次ã®è¡ã®è¡æ«ãŸã§ã«ãŒãœã«ã移åããŸã: j$ 5. p ãæŒããŠè²Œãä»ã(put)ãŠããã次ãã¿ã€ãããŸã: a second <ESC> 6. ããžã¥ã¢ã«ã¢ãŒã㧠" item." ãéžæããy ã§ã€ã³ã¯ã次ã®è¡ã®è¡æ«ãŸã§ j$ 㧠移åãã p ã§ããã¹ããããã« put ããŸãã ---> a) this is the first item. b) NOTE: åèªã1〠yank ããã®ã« y ããªãã¬ãŒã¿ãšã㊠yw ãšããããšãåºæ¥ãŸãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 6.5: ãªãã·ã§ã³ã®èšå® ** æ€çŽ¢ã眮æã®éã«å€§æå/å°æåãç¡èŠããã«ã¯ããªãã·ã§ã³ãèšå®ããŸã ** 1. 次ã®æ§ã«å ¥åã㊠'ignore' ãæ€çŽ¢ããŸããã: /ignore <ENTER> n ãæŒããŠäœåºŠãæ€çŽ¢ãç¹°ãè¿ããŸãã 2. 次ã®æ§ã«å ¥åã㊠'ic' (Ignore Case ã®ç¥) ãªãã·ã§ã³ãèšå®ããŸã: :set ic 3. ã§ã¯ n ã«ãã£ãŠãã1床 'ignore' ãæ€çŽ¢ããŸãã n ãæŒããŠããã«æ°åæ€çŽ¢ãç¹°ãè¿ããŸãããã 4. 'hlsearch' ãš 'incsearch' ãªãã·ã§ã³ãèšå®ããŸããã: :set hls is 5. æ€çŽ¢ã³ãã³ããåå ¥åããŠãäœãèµ·ãããèŠãŠã¿ãŸããã: /ignore <ENTER> 6. 倧æåå°æåã®åºå¥ãç¡å¹ã«ããã«ã¯æ¬¡ã®æ§ã«å ¥åããŸã: :set noic NOTE: ãããã®åŒ·èª¿è¡šç€ºããããã«ã¯æ¬¡ã®æ§ã«å ¥åããŸã: :nohlsearch NOTE: 1ã€ã®æ€çŽ¢ã³ãã³ãã ã倧æåå°æåã®åºå¥ããããããªãã°ããã¬ãŒãºã« \c ã䜿çšããŸã: /ignore\c <ENTER> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 6 èŠçŽ 1. o ãã¿ã€ããããšã«ãŒãœã«ã®äžã®è¡ãéããŠãããã§æ¿å ¥ã¢ãŒãã«ãªãã O (倧æå) ãã¿ã€ããããšã«ãŒãœã«ã®äžã®è¡ã§æ¿å ¥ã¢ãŒãã«ãªãã 2. ã«ãŒãœã«äžã®æåã®æ¬¡ããããã¹ããè¿œå ããã«ã¯ a ãšã¿ã€ãããã è¡æ«ã«èªåã§ããã¹ããæ¿å ¥ããã«ã¯å€§æå A ãã¿ã€ãããã 3. e ã³ãã³ãã¯åèªã®çµç«¯éšã«ãŒãœã«ã移åããã 4. y ãªãã¬ãŒã¿ã¯ããã¹ãã yank (ã³ããŒ)ããp ã¯ããã put (ããŒã¹ã)ããã 5. 倧æåã® R ãã¿ã€ããããšçœ®æã¢ãŒãã«å ¥ãã<ESC>ãæŒããšæããã 6. ":set xxx" ãšã¿ã€ããããšãªãã·ã§ã³ "xxx" ãèšå®ãããã 'ic' 'ignorecase' æ€çŽ¢æã«å€§æåå°æåã®åºå¥ããªã 'is' 'incsearch' æ€çŽ¢ãã¬ãŒãºã«éšåãããããŠããéšåã衚瀺ãã 'hls' 'hlsearch' ããããããã¹ã匷調衚瀺ãã é·ãæ¹ãçãæ¹ãã©ã¡ãã®ãªãã·ã§ã³åã§ã䜿çšã§ããŸãã 7. "no" ãä»äžãããªãã·ã§ã³ãç¡å¹ã«ããŸã: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 7.1: ãªã³ã©ã€ã³ãã«ãã³ãã³ã ** ãªã³ã©ã€ã³ãã«ãã䜿çšããŸããã ** Vim ã«ã¯åºç¯ã«ããããªã³ã©ã€ã³ãã«ãã·ã¹ãã ããããŸãã ãã«ããéå§ããã«ã¯ãããã3ã€ã®ã©ãã1ã€ãè©ŠããŠã¿ãŸããã: - ãã«ãã㌠<HELP> ãæŒã(ãããããªãã°)ã - <F1> ããŒãæŒã(ãããããªãã°)ã - :help <ENTER> ãšã¿ã€ãããã ãã«ããŠã£ã³ããŠã®ããã¹ããèªããšããã«ãã®åäœãç解ã§ããŸãã CTRL-W CTRL-W ãšã¿ã€ããããš ãã«ããŠã£ã³ããŠãžãžã£ã³ãããŸãã :q <ENTER> ãšã¿ã€ããããš ãã«ããŠã£ã³ããŠãéããããŸãã ":help" ã³ãã³ãã«åŒæ°ãäžããããšã«ãããããããé¡åã®ãã«ããèŠã€ããããš ãã§ããŸããããããè©ŠããŠã¿ãŸããã(<ENTER> ãã¿ã€ããå¿ããªãããã«): :help w :help c_CTRL-D :help insert-index :help user-manual ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 7.2: èµ·åã¹ã¯ãªããã®äœæ ** Vim ã®ç¹åŸŽãçºæ®ãã ** Vim ã«ã¯ Vi ãããå€ãã®ç¹åŸŽãèžãŸããŠããŸããããã®ã»ãšãã©ã¯åæç¶æ ã«ãŠ 䜿çšäžå¯ãšãªã£ãŠããŸããããå€ãã®ç¹åŸŽã䜿ãã¯ãããã«ã¯ "vimrc" ãã¡ã€ã« ãäœæããŸãã 1. "vimrc" ãã¡ã€ã«ã®ç·šéãéå§ãããããã¯ã·ã¹ãã ã«äŸåããŸãã :edit ~/.vimrc UNIX åã :edit $VIM/_vimrc MS-Windows åã 2. ããã§ãµã³ãã«ã® "vimrc" ãèªã¿èŸŒã¿ãŸãã :read $VIMRUNTIME/vimrc_example.vim 3. 以äžã®ããã«ãã¡ã€ã«ãžæžã蟌ã¿ãŸãã :write 次å Vim ãèµ·åãããšãè²ã¥ãæ§æã䜿ããããã«ãªãã§ãããã ãã® "vimrc" ãã¡ã€ã«ãžãã奜ã¿ã®èšå®ãè¿œå ããããšãã§ããŸãã ããå€ãã®æ å ±ãåŸãã«ã¯ :help vimrc-intro ãšã¿ã€ãããŸãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 7.3: è£å® ** CTRL-D ãš <TAB> ã§ã³ãã³ãã©ã€ã³ãè£å®ãã ** 1. äºæã¢ãŒãã§ãªãããšã確èªããŸã: :set nocp 2. çŸåšã®ãã£ã¬ã¯ããªã«åšããã¡ã€ã«ã :!ls ã :!dir ã§ç¢ºèªããŸãã 3. ã³ãã³ãã®éå§ãã¿ã€ãããŸã: :e 4. CTRL-D ãæŒããš Vim 㯠"e" ããå§ãŸãã³ãã³ãã®äžèŠ§ã衚瀺ããŸãã 5. <TAB> ãæŒããš Vim 㯠":edit" ãšããã³ãã³ãåãè£å®ããŸãã 6. ããã«ç©ºçœãšãæ¢åã®ãã¡ã€ã«åã®å§ãŸããå ããŸã: :edit FIL 7. <TAB> ãæŒããš Vim ã¯ååãè£å®ããŸãã(ããäžã€ããç¡ãã£ãå Žå) NOTE: è£å®ã¯å€ãã®ã³ãã³ãã§åäœããŸãããã㊠CTRL-D ãš <TAB> æŒããŠã¿ãŠãã ãããç¹ã« :help ã®éã«åœ¹ç«ã¡ãŸãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ã¬ãã¹ã³ 7 èŠçŽ 1. ãã«ããŠã£ã³ããŠãéãã«ã¯ :help ãšããã <F1> ããã㯠<Help> ãæŒãã 2. ã³ãã³ã(cmd)ã®ãã«ããæ€çŽ¢ããã«ã¯ :help cmd ãšã¿ã€ãããã 3. å¥ã®ãŠã£ã³ããŠãžãžã£ã³ãããã«ã¯ CTRL-W CTRL-W ãšã¿ã€ãããã 4. ãã«ããŠã£ã³ããŠãéããã«ã¯ :q ãšã¿ã€ãããã 5. ã奜ã¿ã®èšå®ãä¿ã€ã«ã¯ vimrc èµ·åã¹ã¯ãªãããäœæããã 6. : command ã§å¯èœãªè£å®ãèŠãã«ã¯ CTRL-D ãã¿ã€ãããã è£å®ã䜿çšããã«ã¯ <TAB> ãæŒãã ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ããã«ãŠ Vim ã®ãã¥ãŒããªã¢ã«ãçµãããŸãããšãã£ã¿ãç°¡åã«ããããå å㫠䜿ãããšãã§ããããã«ãšãVim ã®æã€æŠå¿µã®èŠç¹ã®ã¿ãäŒããããšããŸããã Vim ã«ã¯ããã«å€ãã®ã³ãã³ãããããããã§å šãŠã説æããããšã¯ã§ããŸããã 以éã¯ãŠãŒã¶ãŒããã¥ã¢ã«ãåç §ãã ãã: ":help user-manual" ãã以åŸã®åŠç¿ã®ããã«ã次ã®æ¬ãæšèŠããŸãã Vim - Vi Improved - by Steve Oualline åºç瀟: New Riders æåã®æ¬ã¯å®å šã« Vim ã®ããã«æžãããŸããããšãããåå¿è ã«ã¯ã奚ãã§ãã å€ãã®äŸé¡ãå³çãæ²èŒãããŠããŸãã 次ã®URLãåç §ããŠäžãã http://iccf-holland.org/click5.html 次㯠Vim ããã Vi ã«ã€ããŠæžãããå€ãæ¬ã§ããæšèŠããŸã: Learning the Vi Editor - by Linda Lamb åºç瀟: O'Reilly & Associates Inc. Vi ã§ãããããšæãããšã»ãŒå šãŠãç¥ãããšãã§ããè¯æžã§ãã 第6çã§ã¯ãVim ã«ã€ããŠã®æ å ±ãå«ãŸããŠããŸãã ãã®ãã¥ãŒããªã¢ã«ã¯ Colorado State University ã® Charles Smith ã®ã¢ã€ã㢠ãåºã«ãColorado School of Mines ã® Michael C. Pierce ãš Robert K. Ware ã® äž¡åã«ãã£ãŠæžãããŸããã E-mail: bware@mines.colorado.edu. Modified for Vim by Bram Moolenaar. æ¥æ¬èªèš³ æŸæ¬ æ³°åŒ <mattn.jp@gmail.com> ç£ä¿® æ岡 倪é <koron.kaoriya@gmail.com> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vi:set ts=8 sts=4 sw=4 tw=78: