SlideShare une entreprise Scribd logo
1  sur  505
Télécharger pour lire hors ligne
1
    __                        ___                  ___                     ____                 ____
    |   |                    /       /          /       /              /       |         /        |
    |   ||                /       / /          /__/ /                  /          ||        /         ||
    |   ||                /    / /             __/                  /    /|     ||     /       /|    ||
    |   ||            /       / /          ___                    /       / |     ||    /       / |    ||
    |   ||            /    / /            /    /                 /   / /|        || /       / /|      ||
    |   ||        /       / /          /      / /             /       / / |       ||/    / / |         ||
    |   ||     /       / /            /    / /             /      / /         |   |/    / /      |     ||
    |   ||    /    / /            /        / /            /       / /         |        / /       |    ||
    |   || /      / /             /    / /            /       / /             |    / /           |    ||
    |   ||/    / /            /       / /             /    / /                |    / /           |    ||
    |   |/    / /         /       / /             /       / /                 |__/ /             |     ||
    |        / /          /    / /             /      / /                     __/              |    ||
    |    / /          /       / /             /    / /                                           |    ||
    |    / /          /    / /             /      / /                                            |    ||
    |__/ /         /__/ /                  /__/ /                                                |__||
    __/          __/                   __/                                                 __|




                                  Bram Moolenaar
                                  ZhaoRuFei<slimzhao@hotmail.com>
                                  7.2




                                                              1
2




                                                Vim
                      Vim
                                      Vim




              Vim




                                                            Vim




                     Vim

               Vim
                                                      1




                     Vim

                    notepad, word, edit
               Vim
                                                      BUG


                              Vim(    vi)



                                          Vim
        Vim




    1
                      Emacs

                                      2
3

    Vim                                                            notepad, edit




                                                               UNIX
                    :help xxx




                                        Mission Impossible
                                                             Vim

              1
                                              i18n           internationalization
    Vim                       the             teh                      Vim
                                                                    script
                                                                    Vim
                        Vim
        Vim                   SHELL
              Vim

                        Vim


    Vim                                                                       Vim


                                                                                    LTEX
                                                                                    A

                    LTEX
                    A



                                                                                    email
    <slimzhao@hotmail.com>




    1
                    "               "     "              "

                                                     3
4

    The Vim user manual and reference manual are
    Copyright (c) 1988-2002 by Bram Moolenaar.    This
    material may be distributed only subject to
    the terms and conditions set forth in the Open
    Publication License, v1.0 or later.    The latest
    version is presently available at:


        http://www.opencontent.org/openpub/

    People who contribute to the manuals must agree
    with the above copyright notice.


                         Vim


                                         <slimzhao@hotmail.com>
                                                        2004/06/08




                               4
5




        Acrobat Reader




    5
6                                                         0.2

                                 0.2
0.2       0.1

                    2                  (                   ).

                    Acrobat                              Acrobat
Reader          5       6

    3     4

===============


===============


                %

           (<qzhen@flotu.org>)             gbk2uni.exe

        CTex




                                 6
7                                                                    6.3.0

                                      6.3.0

1.                    6.3.0

              VIM 6.3,                                   6.1




2.    6.3.0 0.2


(A) 0.1         0.2                   usr 21.txt, usr 22.txt, usr 29.txt,
      usr 45.txt 4                4



(B)                                             shell

                                 ex command
       :au BufRead *.tip setf tip




                              7                                Vim
                      ex command            6

      normal mode command
      Vim normal
                              normal mode command
       gg=G


      shell command
                       unix                 shell                    windows
      OS DOS BOX
                               shell command
       env LANG=de_DE.ISO_8859-1 vim


      Display




                                        7
8                                                                                6.3.0

                                     Display
          :!make | &tee /tmp/vim215953.err
          gcc -g -Wall -o prog main.c sub.c
          main.c: In function 'main':
          main.c:6: too many arguments to function 'do_sub'
          main.c: At top level:
          main.c:10: parse error before '}'
          make: *** [prog] Error 1


          2 returned
          "main.c" 11L, 111C
          (3 of 6): too many arguments to function 'do_sub'
          Hit ENTER or type command to continue


          List

                                                        List
          r                 Insert
          o                 Normal            "o"    "O"
          c                  'textwidth'


          code
                                                        code
          while i < b {
                        if a {
                                     b = c;
                        }
          }


          url
                                       URL
          http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts.tar.gz


    (C)                                                        cmtt       computer modern
          typewriter                              cmr(computer modern roman)
                                         Latex                      L TEX
                                                                     A
              cmr                             cmtt               LTEX
                                                                 A                  A
                    1

     1
      <unicell@gmail.com>                                             "     "
    "    "                "                   ;      "

                                                    8
9                                                                                               6.3.0

(D)



                              URL                                                       email
                                  mail

(E)                                              ‘‘...’’(LTEX
                                                         A                 ),
             ...                                  "..."                                 ’
                                  '
                                                                     /hello hi
                                            hi

(F)                                                                                             CTRL-N,
         <Esc>

(G)                     BUG
                                                                                            1
                                                                                    /
              ...

(H)                       PDF             HTML               HTML                       bgcolor
                                                             PDF
                                  PDF             Tex

                                                                       2

                                                               PL           (Public License
               Piao Liang)                                 windows



3.       TODO:


         upquote LTEX package
                 A                                             ’                    '


                    fancyvrb
                              "       "                "                        "
                                                                                                   .
     1



         "     "    "     "                                                         .
     2
             PDF

                                                   9
10                 6.3.0

             ---
     LTEX
     A             TMD




        10
11                                                                                7.0

                                            7.0
0.             7.0                                       "      "         Bram
          Beta
                                                                                   7.0f
Beta                 7.0 "   "

                   7.0       release                         7.0

1.


                                           List
-         50
-                        :Omni
-
-
- Vim                                             ( Python            )
- Vim
-         Unicode
-
-
-         grep
-                        zip/tar
-



---       http://groups.yahoo.com/group/vimannounce/message/159

2.
                                   ,        ,                      VIM
    :colorscheme default,                                    |41.1|
      |                                ,                                  .
               |                 .

3.                                           ,                                ,
                                   ,                                  .




                                            11
12                                                                        7.1

                                                    7.1
         7.1                                                                      7.0
              bugfix                                                bugfix


                                          shell command
         cd $VIM/vim71/doc
         for i in usr*; do diff ../../vim70/doc/$i $i; done > tmp.txt
         wc tmp.txt



                   366
                                                  Display
1c1
< *usr_01.txt*             For Vim version 7.1.       Last change: 2006 Oct 08
---
> *usr_01.txt*             For Vim version 7.0.       Last change: 2006 Apr 24



                                          132




          (A) |02.8| (                        )


          (B) |10.2|                    ":substitute"           p



                       p

          (C) |12.1|                                                         "fourty"
                  "fourteen"            fourty

          (D) |24.3|                              Omni

          (E) |41.10|        Comments                         Unix              Vim
                                        Vim                                       shell



                                                    12
13                                                         7.1




 1.                            1.5




 2. LTEX
    A

          LTEX
          A                                 LTEX
                                            A


 3.



                                     Mail
      "    ...       "         " ...    "


            11,300,000
            23,600,000


      google             :-)


      "    " " "           1986                            "   "
      "    "                                   " ...   "           "
      ...        "




 <step by step@263.net>           Mail




                                  13
14                     7.1



     :-)   LTEX
           A




                  14
15                                  7.2

                  7.2
7.2                          7.2   7.1
 7.1   7.0   bugfix        7.2
              |    7.1 |




                  15
16                                                         LTEX
                                                           A



                                LTEX
                                A


0.                          LTEX
                            A

                                        <slimzhao@hotmail.com>




                 LTEX
                 A                                                *


1*.   fancyvrb    Verbatim




                        a

                            b




a
         7.1
b
         7.1


2*.       fancyvrb Verbatim




           Verbatim xleftmargin xrightmargin




                                   16
17                                                                        LTEX
                                                                          A



3*.                     CJK


    " "




                "s:count"                                              "other.vim"




                    1
    COPY

                  sloppy             LTEX
                                      A                /




                  "s:count"
    "other.vim"


4*.                                                :
                    EMAIL      slimzhao@21cn.com                " a"
                                                  CopyRight        c

         LTEX
         A                     marvosym                MVAt
           @
                        MAIL          :


                                   L TEX
                                   A
newcommand{VimMailURL}[1]
                {textcolor{VimURLColor}{href{mailto:#1}{#1}
}



         email                                    VimMailURL
                        #1        @                MVAt.
     1
             Vim
         C/C++/Java
    "[a-zA-Z ][a-zA-Z0-9 ]*"

                                             17
18                                                            LTEX
                                                              A




                            L TEX
                            A
newcommand{VimMailURL}[2]{
        texttt{<}textcolor{VimURLColor}{href{mailto:#1@#2}
        {#1{footnotesizeMVAt}#2}}texttt{>}}



        Vim                              VimMailURL{xxx}{yyy.zzz}

5.
        LTEX
        A

                        6.3




                                    18
19                                                     LaTeX

                            LTEX
                            A

                                        LTEX
                                        A

 <rice maxwell@163.com> <chunmin.yang@gmail.com>
                        LTEX
                        A                             TEX/LTEX
                                                          A

     PDF               LTEX
                       A

 LTEX
 A                    PDF
 TEX                                           LTEX
                                               A




        LTEX
        A                                                        .zip




               CTeX




                                   19
20




0.       <002424@fudan.edu.cn>


     PDF
                                                                     Acrobat
Reader                         Acrobat 7                      ->     (
         CTRL-K)
                        check box
                                                                         RGB
     (255,255,242).

1.       <laneast@hotmail.com>                     HTML Txt
                 HTML                                                    LTEX
                                                                         A

                                                         docbook


2.                        <chunmin.yang@gmail.com>
                                           Vim




3.       <chenbo.liu@gmail.com>                                          PDF
           j k                                   Acrobat Reader

4.                                                   (<taker2001@gmail.com>,
<chunlinyao@gmail.com>, <chunmin.yang@gmail.com> )
                 Vim


                        Vim
                   90%                     90%




                                    bash
     :

                                            20
21


                           shell command
for i in usr*; do diff ../../vim70c/doc/$i $i; done > tmp.txt
gvim tmp.txt &


                                     7.0


5.
                                               MAIL             :
<002424@fudan.edu.cn>
<ankyhe@gmail.com>
<baikaishiuc@hotmail.com>
<chenbo.liu@gmail.com>
<chunlinyao@gmail.com>
<chunmin.yang@gmail.com>
<huanlf@gmail.com>
<KDV367@motorola.com>
<laneast@hotmail.com>
<livahu@gmail.com>
<lsl635@sina.com>
<maintainer@vim.org>
<rice maxwell@163.com>
<ringken@gmail.com>
<step by step@263.net>
<taker2001@gmail.com>
<unicell@gmail.com>
<xyzguy@126.com>
<yangxcmail-linux@yahoo.com.cn>
<zhasm64@gmail.com>




 sort -f| uniq -i                               mail


6.


                   MAIL

                                21
22                                                  00

*usr toc.txt*                    Vim 7.0 .      2006 04 24




       VIM                 ---         Bram Moolenaar
                         <slimzhao@hotmail.com>

                                             *user-manual*




|usr 01.txt|
|usr 02.txt| Vim
|usr 03.txt|
|usr 04.txt|
|usr 05.txt|             Vim
|usr 06.txt|
|usr 07.txt|
|usr 08.txt|
|usr 09.txt|       GUI
|usr 10.txt|
|usr 11.txt|
|usr 12.txt|




|usr 20.txt|
|usr 21.txt|
|usr 22.txt|

                                 22
23                                   00

|usr 23.txt|
|usr 24.txt|
|usr 25.txt|
|usr 26.txt|
|usr 27.txt|
|usr 28.txt|
|usr 29.txt|
|usr 30.txt|
|usr 31.txt|       GUI
|usr 32.txt|




                             Vim

|usr 40.txt|
|usr 41.txt| Vim
|usr 42.txt|
|usr 43.txt|
|usr 44.txt|
|usr 45.txt|




                             Vim

|usr 90.txt|       Vim




|ref-manual.txt|


                                   HTML PDF



     http://vimdoc.sf.net

                            23
24                                00




                            Vim

|usr 01.txt|

     |01.1|
     |01.2|
     |01.3|     Vim
     |01.4|



|usr 02.txt| Vim

     |02.1|           Vim
     |02.2|
     |02.3|
     |02.4|
     |02.5|
     |02.6|
     |02.7|
     |02.8|



|usr 03.txt|

     |03.1|    Word
     |03.2|
     |03.3|
     |03.4|
     |03.5|
     |03.6|
     |03.7|
     |03.8|
     |03.9|
     |03.10|



                            24
25                                     00

|usr 04.txt|

     |04.1|
     |04.2|
     |04.3|
     |04.4| Visual
     |04.5|
     |04.6|
     |04.7|
     |04.8|
     |04.9|
     |04.10|



|usr 05.txt|         Vim

     |05.1| vimrc
     |05.2| vimrc
     |05.3|
     |05.4|          plugin
     |05.5|
     |05.6|
     |05.7|



|usr 06.txt|

     |06.1|
     |06.2|                   ?
     |06.3|
     |06.4|
     |06.5|
     |06.6|



|usr 07.txt|

     |07.1|
     |07.2|

                                  25
26                               00

     |07.3|
     |07.4|
     |07.5|
     |07.6|
     |07.7|



|usr 08.txt|

     |08.1|
     |08.2|
     |08.3|
     |08.4|
     |08.5|
     |08.6|
     |08.7|       vimdiff
     |08.8|



|usr 09.txt|      GUI

     |09.1| GUI
     |09.2|
     |09.3|
     |09.4|



|usr 10.txt|

     |10.1|
     |10.2|
     |10.3|
     |10.4|
     |10.5|
     |10.6|
     |10.7|
     |10.8|
     |10.9|



                            26
27                                               00

|usr 11.txt|


         |11.1|
         |11.2|              ?
         |11.3|              ?
         |11.4|



|usr 12.txt|


         |12.1|        word
         |12.2|   "Last, First"   "First Last"
         |12.3|
         |12.4|
         |12.5|
                         1
         |12.6|
         |12.7|
         |12.8|        word




|usr 20.txt|


         |20.1|
         |20.2|
         |20.3|
         |20.4|
         |20.5|



|usr 21.txt|
     1
              Unix

                                  27
28                                 00

     |21.1|
     |21.2|    shell
     |21.3|              viminfo
     |21.4|
     |21.5|
     |21.6|



|usr 22.txt|

     |22.1|
     |22.2|
     |22.3|
     |22.4|



|usr 23.txt|

     |23.1| DOS, Mac   Unix
     |23.2|
     |23.3|
     |23.4|
     |23.5|



|usr 24.txt|

     |24.1|
     |24.2|
     |24.3|
     |24.4|
     |24.5|
     |24.6|
     |24.7|
     |24.8|
     |24.9|
     |24.10| Normal



                              28
29                                                 00

|usr 25.txt|

                   1
         |25.1|
         |25.2|
         |25.3|
         |25.4|
         |25.5|



|usr 26.txt|


         |26.1| Visual
         |26.2|
         |26.3|
         |26.4|        shell             Vim



|usr 27.txt|


         |27.1|
         |27.2|
         |27.3|
         |27.4|
         |27.5|
         |27.6|
         |27.7|
         |27.8|
         |27.9|



|usr 28.txt|


         |28.1|           ?
         |28.2|
         |28.3|
         |28.4|
     1
                   <unicell@gmail.com>         !

                                     29
30                                00

     |28.5|
     |28.6|
     |28.7|
     |28.8|
     |28.9|
     |28.10|             ?



|usr 29.txt|


     |29.1|       tags
     |29.2|
     |29.3|
     |29.4|
     |29.5|



|usr 30.txt|


     |30.1|
     |30.2| C
     |30.3|
     |30.4|
     |30.5|
     |30.6|



|usr 31.txt|      GUI


     |31.1|
     |31.2|
     |31.3|
     |31.4| Vim
     |31.5|



|usr 32.txt|

                             30
31                                           00

     |32.1|
     |32.2|
     |32.3|




     Vim

      Vim

|usr 40.txt|

     |40.1|
     |40.2|
     |40.3|



|usr 41.txt| Vim

     |41.1|
     |41.2|
     |41.3|
     |41.4|
     |41.5|
     |41.6|
     |41.7|
     |41.8|
     |41.9|
     |41.10|
     |41.11|       plugin
     |41.12|                        plugin
     |41.13|                 plugin
     |41.14|                plugin
     |41.15|
     |41.16|       Vim



|usr 42.txt|

                               31
32                  00

     |42.1|
     |42.2|
     |42.3|
     |42.4|



|usr 43.txt|

     |43.1|
     |43.2|



|usr 44.txt|

     |44.1|
     |44.2|
     |44.3|
     |44.4|
     |44.5|
     |44.6|
     |44.7|
     |44.8|
     |44.9|
     |44.10|
     |44.11|
     |44.12|



|usr 45.txt|

     |45.1|
     |45.2|
     |45.3|
     |45.4|
     |45.5|




               32
33                                                     00

        Vim

     Vimming

|usr 90.txt|       Vim


     |90.1| Unix
     |90.2| MS-Windows
     |90.3|
     |90.4|
     |90.5|    Vim




               |manual-copyright| vim:tw=78:ts=8:ft=help:norl:




                               33
34                                                            01

*usr 01.txt*                             Vim 7.0 .            2008 05 07




              VIM                  ---         Bram Moolenaar



                    Vim                              Vim


|01.1|
|01.2|
|01.3|              Vim
|01.4|


                    |usr 02.txt|
                    |usr toc.txt|




*01.1*

         Vim

         1.


         2.                  Vim

                                                 |notation|




                               1
                                   :
     1
                                Vim                        HTML            <a
href=#somewhere>click here</a>    click here                   "click here"
                                     Vim
                               CTRL-]
                                            CTRL-]

                                         34
35                                                     01

                                 List
CTRL-]
CTRL-O



                                                  |bars|
 'number',                     ":write"
                                CTRL-]        CTRL-]

                            ":help"                     |help.txt|.




*01.2*

                                  Vim
       (                 GUI              )
     |usr 90.txt|

                                                    *not-compatible*
                    Vi                           Vim
              Vi
                                                              vimrc
       VIM
           Unix:
                            ex command
:!cp -i $VIMRUNTIME/vimrc_example.vim ~/.vimrc



MS-DOS, MS-Windows, OS/2:
                            ex command
:!copy $VIMRUNTIME/vimrc_example.vim $VIM/_vimrc



Amiga:
                            ex command
:!copy $VIMRUNTIME/vimrc_example.vim $VIM/.vimrc




                    Vim, 'compatible'



                                  35
36                                                                     01

                                          ex command
:set compatible?



               'nocompatible'                              "compatible"



                                          ex command
:scriptnames




                                              'compatible'

                    |vimrc| |compatible-default|


               :                                                 Vim
           "evim"(easy vim)                                Vim
                    Notepad                                Insert


                                             |evim-keys|




*01.3*             Vim

                         (          !)              vimtutor                Vim
                         30

        Unix                  Vim
                                         shell command
vimtutor



     MS-Windows                          "       /Vim"
     $VIMRUNTIME                                           vimtutor.bat.




                                               36
37                                                       01

                               shell command
vimtutor fr



        Unix          ,                                       Vim,
    "gvimtutor"       "vimtutor -g"        "vimtutor".

            OpenVMS            VIM


                               shell command
@   VIM:vimtutor




      1.                             VIM   (                    ):
                                shell command
vim -u NONE -c 'e $VIMRUNTIME/tutor/tutor' -c 'w! TUTORCOPY' -c 'q'



                               "TUTORCOPY"



                                shell command
vim -u NONE -c 'e $VIMRUNTIME/tutor/tutor.fr' -c 'w! TUTORCOPY' -c 'q'



2.         Vim
                           shell command
vim -u NONE -c "set nocp" TUTORCOPY



                   Vim happy

      3.
                               shell command
del TUTORCOPY




*01.4*                                              *manual-copyright*



                                      37
38                                                          01

         Vim                                          c 1988-2003 by Bram
Moolenaar                 "                  "1.0



         http://www.opencontent.org/opl.shtml




                                                                 *frombook*

                                Steve Oualline      Vi IMproved - Vim
     ( New Riders                       ISBN:0735710015).   "
     "                                                            (
                               Vim 6.0                                  )
         |frombook|

               Steve Oualline New Riders                          OPL




                               |iccf|




               |usr 02.txt|
                      |manual-copyright| vim:tw=78:ts=8:ft=help:norl:




                                        38
39                                                     02 Vim

*usr 02.txt*                         Vim 7.0 .        2007 02 28




         VIM                  ---          Bram Moolenaar

                                Vim

                                                 1


                                                     ---   <<      >>


                                    Vim




|02.1|             Vim
|02.2|
|02.3|
|02.4|
|02.5|
|02.6|
|02.7|
|02.8|


               |usr 03.txt|
               |usr 01.txt|
               |usr toc.txt|




*02.1*              Vim



                                shell command
gvim file.txt

     1



                                      39
40                                                           02 Vim

            Vim.

        UNIX
     Microsoft Windows,                   MS-DOS

                     Vim                    file.txt

                              Display
+---------------------------------------+
|#                                              |
|~                                              |
|~                                              |
|~                                              |
|~                                              |
|"file.txt" [New file]                          |
+---------------------------------------+


("#"                       .)

               (~)                                                    Vim


                   file.txt


VIM
      gvim
                                shell command
vim file.txt


                                                                   xterm
                                    xterm                        Microsoft
Windows        MS-DOS
                                                    gvim




*02.2*

      Vim
                                  Normal            Insert      Normal

                                     40
41                                                            02 Vim

                                                     Insert


              Vim          Normal                Insert                "i"
    (i     Insert)



                                     Display
iA very intelligent turtle
Found programming UNIX a hurdle




"turtle"                                             <Esc>       Insert
     Normal                  Vim

                              Display
+---------------------------------------+
|A very intelligent turtle                       |
|Found programming UNIX a hurdle                 |
|~                                               |
|~                                               |
|                                                |
+---------------------------------------+




                                    ex command
:set showmode




              (                                                    )
                       (                                                   ).

                           "i"       Vim                      --INSERT--
                  Insert




                                        41
42                                                                02 Vim

                              Display
+---------------------------------------+
|A very intelligent turtle                                |
|Found programming UNIX a hurdle                          |
|~                                                        |
|~                                                        |
|-- INSERT --                                             |
+---------------------------------------+



                        <Esc>               Normal
                                1
     "--INSERT--"



         Vim                                     ---


                        <Esc>                    Normal       (      Normal
     )                       <Esc>          Vim
                         2
         Normal




*02.3*

               Normal

                                            List
h
j
k
l



                                                                           l
     right


                                            (
                )
     1
           Normal                   --NORMAL--
     2
             google

                                            42
43                                                            02 Vim

               :




                   hjkl


                                                                h            l
       j


                                       k
                                   h         l
                                       j



         "i"          Insert                                        hjkl
                                                      <Esc>              Normal
     |vimtutor|

                              Hiroshi Iwatani
                                            Display
                    Komsomolsk
                          ^
                          |
     Huan Ho        <--- --->    Los Angeles
(Yellow river)            |
                          v
                      Java (the island, not the programming language)




*02.4*

                                                             "x".    (
                                                      xxxx               )
                                   xxxxxxx(7 x)              "A very "




                                       43
44                                                   02 Vim

                              Display
+---------------------------------------+
|intelligent turtle                           |
|Found programming UNIX a hurdle              |
|~                                            |
|~                                            |
|                                             |
+---------------------------------------+




                                  Display
iA young <Esc>


                    i(      Insert        )       "A young"
     Insert    (         <Esc>)
                              Display
+---------------------------------------+
|A young intelligent turtle                   |
|Found programming UNIX a hurdle              |
|~                                            |
|~                                            |
|                                             |
+---------------------------------------+




                          "dd"
                              Display
+---------------------------------------+
|Found programming UNIX a hurdle              |
|~                                            |
|~                                            |
|~                                            |
|                                             |
+---------------------------------------+




        Vim
              "J"

                                     44
45                                             02 Vim

                                 Display
A young intelligent
turtle



                          "J":
                                 Display
A young intelligent turtle




*02.5*

                                                         "u"
                                 1
                                                  "dd"
                                 "u"
                      A
                                 Display
A young intelligent turtle



               xxxxxxx    "A young"
                                 Display
intelligent turtle



         "u"                               g


                                 Display
g intelligent turtle



          u
                                 Display
ng intelligent turtle



                  u
     1
                                                          ...



                                     45
46                                                                  02 Vim

                                       Display
ung intelligent turtle
oung intelligent turtle
young intelligent turtle
 young intelligent turtle
A young intelligent turtle



                :                 "u"
                                             Vim            Vi
              |not-compatible|
                    Vim           Vim                                  Vi




                                              CTRL-R(           )
                                                     CTRL-R                       A


                                       Display
young intelligent turtle


                                 "U"
                                       "U"
                                       Display
A very intelligent turtle
     xxxx                                          very


A intelligent turtle
                    xxxxxx                         turtle


A intelligent
                                              "U"
A very intelligent turtle
                                              "u"         "U"
A intelligent



      "U"                                                                   "u"
     CTRL-R

                                             46
47                                                   02 Vim

 "u" CTRL-R                                       |32.1|




*02.6*

     Vim                                 |Q in|




     "i"
                                                              "a"
           "i"


                              Display
and that's not saying much for the turtle.




                              Display
and that's not saying much for the turtle!!!


                                       "x"
           turtle e
                       normal mode command
a!!!<Esc>


     e
                              Display
and that's not saying much for the turtle!!!




     "o"                                                   Insert



                             Display
A very intelligent turtle
Found programming UNIX a hurdle


                                  47
48                                                             02 Vim

                   "o"
                        normal mode command
oThat liked using Vim<Esc>




                                         Display
A very intelligent turtle
That liked using Vim
Found programming UNIX a hurdle



"O"      (                         O)



                               9                 "kkkkkkkkk" "9k"


                                                              "a!!!<Esc>"
                   "3a!<Esc>"           3                       3
     3               "3x"




*02.7*

              Vim              "ZZ"                             Vim.


               : Vim
                                            "ZZ", Vim


             Vim                                              |07.4|




                         Vim
                                        ex command
:q!




                                            48
49                                                                    02 Vim

                                                                      3
 (:)                                         q
                              1   2
                   (.!)

                                                            Vim
                                  ":q"                Vim


                              Display
E37: No write since last change (use ! to override)


                                             Vim, "
                                                              ".


                ":e!"




*02.8*

                                         Vim


                                       ex command
:help



                                                                      <F1>
           <F1>

                                                       ":help"
                        Vim                       (               )


                                         hljk

                                                                      "ZZ"
                                      Vim.

                                                                                  (
 |help|)
     1
                         Vim
     2
           :!                                                                w!



                                             49
50                                                                 02 Vim

                            CTRL-](                       )
                            (                                     Vim
                            CTRL-]                                     word
         1


                                                           CTRL-T(                   )
                                   CTRL-O(                    )

                                       *help.txt*                       "*"
                                                  (               ).

             |29.1|



                                      ex command
:help {subject}



                      "x"
                                      ex command
:help x




                                      ex command
:help deleting



               Vim
                                      ex command
:help index



                                                      (   CTRL-A)
     "CTRL-"
                                      ex command
:help CTRL-A

     1
                            HTML                                              HTML

<a href="http://www.w3.org/2001/HTML">HTML</a>
    Vim                           tag
                 Vim

                                             50
51                                                           02 Vim

                         1
Vim                                                     Normal
                                      Normal        CTRL-H
                                  ex command
:help CTRL-H




 Insert                                      "i "        CTRL-H


                                  ex command
:help i_CTRL-H



         Vim                                                     -
               -t
                                  ex command
:help -t



Vim
                                                        'number'


                                  ex command
:help 'number'



                                      |help-context|

                                                                  Insert


                                  ex command
:help i_<Up>




                              Display
E37: No write since last change (use ! to override)



                    ID
     1
                         Insert     Normal

                                      51
52                                                        02 Vim

                                      ex command
:help E37




                                      ex command
          :help




                         (            Vim            ).
                                      ex command
          :help usr_toc.txt


                     1


                                      ex command
               :help :subject



                     "subject"

                                      ex command
               :help :help




                                      ex command
               :help abc



         normal              "abc"
                                      ex command
               :help CTRL-B



         normal               <C-B>
                                      ex command
               :help i_abc
               :help i_CTRL-B

     1
         7.1                          user-toc.txt

                                            52
53                                                 02 Vim



                                ex command
         :help v_abc
         :help v_CTRL-B



                    Visual
                                ex command
         :help c_abc
         :help c_CTRL-B




                                ex command
         :help ’subject’



         'subject'

                                ex command
         :help subject()



         "subject"

                                ex command
         :help -subject


               1
                   "-subject"

                                ex command
         :help +subject



               "+subject"

                                ex command
         :help EventName



                          "EventName"
     1
          "        "                shell    vim            Vim



                                    53
54                                                     02 Vim

                              ex command
         :help digraphs.txt



          "digraphs.txt"

                              ex command
         :help pattern<Tab>



          "pattern"                          <Tab>


                             ex command
         :help pattern<Ctrl-D>



            "pattern"

                              ex command
         :helpgrep pattern



                                           "pattern"


                              ex command
             :cn




                              ex command
             :cprev
             :cN




                              ex command
             :cfirst
             :clast



     /

                                 54
55                                                02 Vim

                           ex command
            :copen
            :cclose



     /                              <Enter>



         |usr 03.txt|
               |manual-copyright| vim:tw=78:ts=8:ft=help:norl:




                               55
56                                                       03

*usr 03.txt*                          Vim 7.0 .      2006 06 21




          VIM                   ---          Bram Moolenaar




     Vim
                          |Q lr|

|03.1|      Word
|03.2|
|03.3|
|03.4|
|03.5|
|03.6|
|03.7|
|03.8|
|03.9|
|03.10|


                 |usr 04.txt|
                 |usr 02.txt|
                 |usr toc.txt|




*03.1*       Word

           "w"                               word         Vim
                    "w"                                       word
     "3w"                     3 words



                                        56
57                                                                                         03

                              Display
This is a line with example text
     --->-->->----------------->
         w    w     w        3w



                                                   word                   "w"
                        word                       "b"1                                          word


                                        Display
                  This is a line with example text
                  <----<--<-<---------<---
                         b     b b     2b            b



              "e"2                                              word                  3
                                                                                          . "w"
                             "b"                          "e"          "ge"
                                        4
 word                                       :

                              Display
This is a line with example text
         <-       <--- ----->          ---->
         ge         ge         e             e



                                                           word        "w"
 word                                 "w"                                                       "l"
              "b"

                                      non-word                                  ".", "-" ")"
 word                                           Vim word                           'iskeyword'
                                                 WORDs                            WORD
         word                                                      WORD            word




     1
                           backward
     2
                         :end of word
     3
                            "w"                                   word
 "e"                                        word
     4
                                      "e"                                            word
                               word

                                                          57
58                                                                                03

                                             Display
               ge           b          w                                      e
               <-       <-            --->                                --->
This is-a line, with special/separated/words (and some more).
         <----- <-----                -------------------->               ----->
           gE           B                       W                                 E




*03.2*

         "$"                                                                      <End>


                                                                  1
         "^"                                                          .   "0"
                                                       <Home>
                                             Display
                    ^
           <------------
.....This is a line with example text
<-----------------              --------------->
                0                      $


("....."                          )

         "$"


                    "1$"                                   "2$"


         "0"                                                "0"
                "0"
                                                                          2
                                 "^"




*03.3*
     1
     2
                                             "^"

                                               58
59                                                                            03

                                                                     "fx"
              x                "f"     "find"

                                                                      human           h
                       "fh"
                                          Display
To err is human.              To really foul up you need a computer.
---------->--------------->
         fh               fy



                              "fy"                          really

                                                          "3fl"                    "foul"
 "l"
                                          Display
To err is human.              To really foul up you need a computer.
              --------------------->
                               3fl


                               1
"F"                                :
                                          Display
To err is human.              To really foul up you need a computer.
              <---------------------
                                Fh



"tx"               "fx"
                                         "t"         "To"                          "Tx":
                                          Display
To err is human.              To really foul up you need a computer.
                  <------------        ------------->
                       Th                      tn



 4                        ";"               ","
                          2
                                                4
     1
                  :
     2
                      "Fx"                          ","



                                               59
60                                                                                 03

                                            1




*03.4*

                                                        ()                              %2


                      "("                                              ")"
                                                              3
     ")"                                              "("         :
                                                Display
                 %
              <----->
if (a == (b * c) / d)
         <---------------->
                 %


                 []             {}                        (
                                    4
     'matchpairs'                       )

                                                                             "%"
                                                                      "%"
                 "(",                                  ")":
                                                 code
if (a == (b * c) / d)
---+---------------->
                 %




*03.5*

                        C C++

     1
                                    "fx"         x                          "f"
                                                                      Vim
                     Windows

     2
                                                     (<qzhen@flotu.org>)
     3
     4
                               <>           HTML, XML

                                                  60
61                                                                                       03

                                            Display
prog.c:33: j                 undeclared (first use in this function)



                                             33                                                   33
                                    "9999k"1                            "32j"           32
                                                                                         2
                                                                                "G"


 "33G"                                 33              (|usr 30.txt|
                                                   :make                        )
                                                            3
                                                                , "G"
         "gg"                                                           "1G"


                                                  Display
         |       first line of a file              ^
         |       text text text text               |
         |       text text text text               |    gg
7G       |       text text text text               |
         |       text text text text
         |       text text text text
         V       text text text text               |
                 text text text text               |    G
                 text text text text               |
                 last line of a file               V



                                                                                              4
                                                             "%"                                  .
                                                                5
 "50%"                                                              .   "90%"
 6


     1
                                9999                                            C/C++

                   Vim
     2
                         G     Go
     3
                                                                        Vim


     4
             :                                                                      N
     5
                                       50%
     6
                 Vim
                                :goto 3

                                                       61
62                                                               03




                                    Display
              +---------------------------+
H -->         | text sample text            |
              | sample text                 |
              | text sample text            |
              | sample text                 |
M -->         | text sample text            |
              | sample text                 |
              | text sample text            |
              | sample text                 |
L -->         | text sample text            |
              +---------------------------+



          "H"      Home, "M" Middle, "L" Last.




*03.6*



         1.       CTRL-G                                              (
     'ruler'               ):
                              Display
"usr_03.txt" line 233 of 650 --35%-- col 45-52




                      -                          "col 2-9"
                                                             8
                                      9.
                                1
         2.       'number'
                                    ex command
:set number

     1



                                       62
63                                                                               03

         1                              2
                                            :


                                                ex command
:set nonumber




               'number'                                                   "no"


         Vim


         3.         'ruler'                        Vim



                                                ex command
:set ruler




               'ruler'
                                    3




*03.7*

         CTRL-U




         CTRL-D




     1
                "      "                          <xyzguy@126.com>
     2
                    :no        boolean
     3
                                      Vim                set number
                                                                      :set nonumber ruler
                           number                                      |gq|

                                                    63
64                                                                     03

                                       Display
                                        +----------------+
                                        | some text              |
                                        | some text              |
                                        | some text              |
+---------------+                       | some text              |
| some text          |   CTRL-U   --> |                          |
|                    |                  | 123456                 |
| 123456             |                  +----------------+
| 7890               |
|                    |                  +----------------+
| example            |   CTRL-D -->     | 7890                   |
+---------------+                       |                        |
                                        | example                |
                                        | example                |
                                        | example                |
                                        | example                |
                                        +----------------+




                                  CTRL-E(                ) CTRL-Y(             )
            CTRL-E       Extra.    (                  MS-Windows
         CTRL-Y                                     ).

                             (                               )        CTRL-F
                                                         1               2
     CTRL-B                             CTRL-F               CTRL-B


                                       "j"
                                                                      "zz"




     1
                  Forward
     2
                  Backward

                                            64
65                                                                                   03

                                             Display
+------------------+                            +------------------+
| some text                   |                   | some text                |
| some text                   |                   | some text                |
| some text                   |                   | some text                |
| some text                   |    zz   -->       | line with cursor |
| some text                   |                   | some text                |
| some text                   |                   | some text                |
| line with cursor |                              | some text                |
+------------------+                              +------------------+


                                              1                                           2
"zt"                                               "zb"
                                                        |Q sc|
                                                       'scrolloff'




*03.8*

         "/string"                                                                 "include"


                                   normal mode command
/include


                                                         3
                             "/"                             Vim




                   :         .*[]^%/?~$




                                                                       "n"
                                          #include:
     1
             "zt"        t    top z
                                        zt        Zhuan Tie(       )         :-)
     2
                       "b"    bottom
     3
             Vim

                                                  65
66                                                                                  03

                                     normal mode command
/#include



                       "n"                                   #include
                                                                                  "n"
                            "3n"                             3                "/"
                            1


                                                                  2
         "?"            "/"                                           :
                                     normal mode command
?word



"N"                                                      "/" "?"
                      "/"            "N"                          "?"             "N"




                                             'ignorecase'
                                           ex command
:set ignorecase



                            "word"                     "Word" "WORD"


                                           ex command
:set noignorecase

     1
                                               normal                                        /
                                                   N                      N
                  /                                              /text
    n     N                                        /     N                :
a   1    b
a   2    b
a   3    b
a   4    b
a   5    b
a   6    b
         normal                      1      2/d                              3          2
                          n                                  4
     2
                        Vim

                                              66
67                                                                         03




                         3
                                normal mode command
/one
/two
/three



                         "/"
         Vim        "/three"                                               "three"
                                                          Vim              "/two"
               "/one"




                                              "/o<Up>"1 Vim           "/one"


             ":"


                               WORD
                                          word "TheLongFunctionName"
                                              "/TheLongFunctionName"
                                            Vim

                                                                    word
 "*"               Vim                             word
         2


         "#"             "*"
 :"3*"                          word

                   WORD
                      "/the"     Vim                  "there"
 "the"

     1
               <Up>
     2
                   :                                 word       ?
         Visual select, yank, :let   @   /=@", n

                                              67
68                                                                          03

                               normal mode command
/the>


">"1                                       word                                  "<"
                          2
            word                                    word "the"
                               normal mode command
/<the>


                              "there" "soothe".             "*" "#"
                   word                                               word(
     "g*" "g#"                                          word          .)



                                                         "nr"
                                                                           "nr"
     "*"         "n"


                                    ex command
:set hlsearch


                    "nr", Vim

     3




                                    ex command
:set nohlsearch




                                            4
                                                :
                                    ex command
:nohlsearch

     1
           <qujianning@gmail.com>                   >
     2
                 word
                        0
     3
                                                         |/%<3l|
     4

                                        'hlsearch'

                                       68
69                                                          03

               'hlsearch'


         "n" "N"




                                  ex command
:set incsearch



                                       Vim



                                  ex command
:set nowrapscan




                     'wrapscan'


           1


                                                      Vim
                                               Vim
               |not-compatible|


                                  ex command
:scriptnames




                                  ex command
:edit ~/.vimrc



                                                         Vim


                                  ex command
Go:set hlsearch<Esc>

     1
                   <qujianning@gmail.com>            INTERMEZZO

                                      69
70                                                                03

"G"                                      "o"
     ":set"                     <Esc>
                                    normal mode command
ZZ



                   Vim     'hlsearch'




*03.9*

             Vim




     |usr 27.txt|.                  |pattern|



             ^
     1
         6                 "include"
             include                           "^include"
     include.

             $                                "was$"                   was.

                              "x"              "the"
                              Display
the solder holding one of the chips melted and the
xxx                                     xxx                 xxx



                 "/the$"
                              Display
the solder holding one of the chips melted and the
                                                            xxx



     "^the"
     1



                                                70
71                                                                     03

                              Display
the solder holding one of the chips melted and the
xxx



                        "/^the$"
 "the"                                                                 "the "




         .                                        "c.m"
                                                           1
 c                      m
                              Display
We use a computer that became the cummin winter.
                xxx                xxx      xxx




 "ter."
                              Display
We use a computer that became the cummin winter.
                       xxxx                               xxxx



             "ter."                        2




*03.10*

                "G"                                              Vim
                            Vim


                                  normal mode command
``

     1
                                     l



                                          71
72                                                                                03

                                                                                        1


                                                                              `
                                                                          `


                                               "/" "n"                    (
                         )                                "fx" "tx"           word
                                  "w" "e"

                  "j" "k"


         ``                                               CTRL-O
                         (            O         older).       CTRL-I
                     (            I                       O       )
     3
                                           normal mode command
33G
/^The
CTRL-O


                                  2
                             33                                   "The"
     CTRL-O                           33                  CTRL-O                      "33G"
                                          CTRL-I                              33
     CTRL-I                                               "/^The"
                                                  Display
              |   example text             ^                  |
 33G          |   example text             |    CTRL-O        | CTRL-I
              |   example text             |                  |
              V   line 33 text             ^                  V
              |   example text             |                  |
/^The |           example text             |    CTRL-O        | CTRL-I
              V   There you are            |                  V
                  example text


     1
                         '                                                        `           1

     2
                                                          " "



                                                     72
73                                                                  03

              :         CTRL-I          <Tab>


     ":jumps"
                          ">"



     Vim                                              "ma"
                  "a"    a z                 26
                                  Vim

                                                    `{mark}, {mark}


                                normal mode command
`a



     'mark(                                     )            mark
           `mark                `mark                        mark




                                                      s(start)
                                normal mode command
ms



                                                          e(end)
                                normal mode command
me




                                normal mode command
's



                  ''                                         'e
 e

                                        73
74                                                       03

                         1                 2
           s                  e




                             ex command
:marks




                                  List
'
"
[
]




         |usr 04.txt|
                 |manual-copyright| vim:tw=78:ts=8:ft=help:norl:




     1
         start
     2
         end

                                  74
75                                                             04

*usr 04.txt*                              Vim 7.0 .           2006 06 21




             VIM              ---                 Bram Moolenaar




                                                          ---


                                                                    3
                                           Visual

|04.1|
|04.2|
|04.3|
|04.4|       Visual
|04.5|
|04.6|
|04.7|
|04.8|
|04.9|
|04.10|


         1
                   |usr 05.txt|             Vim
                   |usr 03.txt|
                   |usr toc.txt|




*04.1*

             2                    "x"
  "4x"                4

     "dw"                          word                 "w"
  word                       "d"



                                           75
76                                                                                04

                            "4w"                           4 word                "d4w"
     4 word.
                              Display
To err is human. To really foul up you need a computer.
                             ------------------>
                                           d4w


To err is human. you need a computer.



         Vim                                                                        Vim
                            word                                       "e"                   word
                                                               1
          Vim                                                      :
                              Display
To err is human. you need a computer.
                            -------->
                              d2e


To err is human. a computer.




                                                                             "           "
                                       2
                       "           "

         "$"                                            "d$"
                              "            "
                                                 Display
To err is human. a computer.
                        ------------>
                                  d$


To err is human


                                                                   +
                                  "d"
     "4l" "w"
     1
     2
                              exclusive inclusive
                   [0, 5)     0≤x<5            [0, 5]                   0≤x≤5
               .

                                                   76
77                                                                          04




*04.2*

                                  "c"                                "d"
                             Insert                 "cw"             word
                        word                  Insert
                                         Display
To err is human
         ------->
           c2wbe<Esc>


To be human


           "c2wbe<Esc>"
                                             List
c
2w                      word(                               Insert      )
be
<Esc>               Normal


                                                                                 "human"


                                                                            "cw"
         "c"            d                                     :"cw",             "ce"
                    word                     word
                             Vi                                                  Vim
                             1




               "dd"                                 "cc"
                    (                   ).

                 "d$"                                  "c$"
                        "d$"                  "a"          Insert




     1
                    :

                                              77
78                                                                 04

                       +


                                            List
x        dl(                            )
X        dh(                                )
D        d$(                        )
C        c$(                        )
s        cl(                    )
S        cc(               )




             "3dw" "d3w"                3 word
               "3dw"                                 word          3
     "d3w"             3 word
                                    "3d2w"                  word        3
     6 word.



      "r"
                                            "cl" "s"                        "r"
                  <Esc>             Normal

                                        Display
there is somerhing grong here
rT               rt        rw


There is something wrong here



      "r"


                                        Display
There is something wrong here
                           5rx


There is something xxxxx here




                                                78
79                                                                                04

                                                                  "r<Enter>"

                                                                     1
         "4r<Enter>"               4




*04.3*

         "."             Vim
                                               HTML                                    <B>
                   <B> <                              "df>"              </B> <         "."
                   "."                                                    (                  "df>")
                                                       <                   "."
                                                    Display
                                       To <B>generate</B> a table of <B>contents
f<                           <         --->
df>                 >                    -->
f<                           <                --------->
.                  df>                                     --->
f<                           <                                ------------->
.                  df>                                                           -->



         "."                                                      "u"     CTRL-R
               (             "."          Normal


                                                 Display
asdf 123
asdf 1234


                             1                 "cwxyz"                    Normal


                                                 Display
asdf xyz


                         1
                                                 Display
asdf xyz

     1



                                                      79
80                                                            04


                                    Display
asdf xyz4


                                                          3           xyz.)

                          "four"       "five"

                                     List
/four<Enter>                         "four"
cwfive<Esc>                "five"
n                                    "four"
.                          "five"
n
.




*04.4*   Visual

                                                +


            Visual

      "v"            Visual




                              Display
This is an examination sample of visual mode
                  ---------->
                     velllld


This is an example of visual mode


                                                    "l"
              "d"

                                                                   <Esc>
     Visual

                                      80
81                                                                     04




                                             "V"           Visual




                "Vjj"             3
                                Display
                    +------------------------+
                    | text more text                   |
               >> | more text more text                | |
selected lines >> | text text text                     | | Vjj
               >> | text more                          | V
                    | more text more                   |
                    +------------------------+




                                                                            CTRL-V
 Visual
                                  Display
name           Q1         Q2        Q3
pierre         123        455         234
john           0          90          39
steve          392        63          334



                "Q2"                        "Q2" "Q"                   CTRL-V
     Visual                     "3j"               3             "w"
 word
     "h"                        "d"



                Visual
                    "o"    (           o      other end                 )


                    "o"

                                                   4                         "o"
                                "O"

                                      81
82                                                                     04

          1


               "o" "O" Visual               Normal                          Normal




*04.5*

               "d" "x"
                     p                     ( Vim            put)


     "dd"                                                   "p"


                                           Display
a line                   a line            a line
line 2          dd       line 3        p   line 3
line 3                                     line 2



                                                  "p"
                                                                   (           word),
                                                        2
"p"

                              Display
Some more boring try text to out commands.
                           ---->
                           dw


Some more boring text to out commands.
                           -------->
                                welp


Some more boring text to try out commands.



         PUTTING
         "P"         "p"
     1
                                 4
     2



                                             82
83                                                                           04

                       "dd"                          "P"
                                                                       1
          "dw"                           "P"



                         "p" "P"
                                       "dd"          "3p"                          3




                                                                       (
 )                                                      "the"        "teh"        Vim
                                               "teh" e                "xp"
         "x"            e                                    "p"                    e
                                   h

                                              Display
teh             th      the
 x               p




*04.6*


 "u"                                   "p"
                              yanking 2 .        "y"
          3
                               "p"

         Yanking        Vim                                 "c"
           4
               , "y"                                         "yank"
         "y"

                "y"                                           "yw"                word.
                                               "y2w"                 word:


     1
     2
                term:yanking
     3
                    "          "                    (")
     4
                        change                    copy

                                                83
84                                                                            04

                                            Display
let sqr = LongVariable *
                -------------->
                       y2w


let sqr = LongVariable *
                               p


let sqr = LongVariable * LongVariable



            "yw"                             word
                "ye"

         "yy"                                "dd"
     "D"                                              "Y"
                                                                       "y$"

                                      Display
a text line          yy         a text line                          a text line
line 2                          line 2                  p            line 2
last line                       last line                            a text line
                                                                     last line




*04.7*

                             Vim GUI           (gvim)                    "Edit"
     "Copy"                  Visual                                            Edit/Copy

                                                        1
                                        Vim                 .


     Vim Edit/Paste                                             Normal             Insert
                   Visual


     1
                               Copy          Normal             yank
    Copy                                                                 Vim
 *, y                                 Vim                        "         Vim

                                              84
85                                                                      04

         "Cut"                                                               "Copy",
"Cut" "Paste"                                                 (
               )              Vim


                       GUI
                                  "y"(yank) "p"(put)
         "*(                                      )
                                    normal mode command
"*yy




                                    normal mode command
"*p



                            Vim
                   |09.3| |clipboard|




*04.8*


                                     "dw"                                      "daw"
1


                                            Display
this is some example text.
                       daw


this is some text.



         "daw"        "d"                        "aw"                         "aw"
    "A Word"                "daw"                     "Delete A Word"
    Word                                     (                                ).
     1
         Vim        Perl                    There is more than one way to do the same
thing. <huanlf@gmail.com>                                        PERL     Perl
    Perl            perl                              :    perl       Perl     PERL
               Perl

                                                 85
86                                                              04

                         Vim
      +          Visual                                        +

                  +




                                     "cis"
                                     Display
Hello there.    This
is an example.    Just
some text.


                                "is an"            "cis"
                                     Display
Hello there.      Just
some text.




     "Another line.":
                                      Display
Hello there.    Another line.        Just
some text.


      "cis"           "c"               "is"            "Inner Sentence"
                            "as"(a sentence)
                                                           "das".
                                                "cis"

                 Visual
     Visual                                         Visual
                               "v"      Visual          "as"
                       "as"


              |text-objects|




*04.9*

                                        86
87                                                                          04

         "R"             Vim          replace
                                                                        1
                                                      <Esc>                 .

                                "text" "t"               Replace


                                            Display
This is text.
               Rinteresting.<Esc>


This is interesting.




                                           12           "interesting."
                            2
 5                 "text."      "R"


                      <Insert>             Insert             Replace
         3
                     <BS>




*04.10*


                                                                                 N
               M                N*M

                     |operator|




     1
               replace

     2
                                                                            12
 <ringken@gmail.com>                   .
  3
          Replace

                                                87
88                                                                04

                                       List
x                                  ("dl"             )
X                                      ("dh"             )
D                                            ("d$"           )
dw                                     word
db                                     word
diw                              word(                   )
daw                              word(               )
dG
dgg



                "c"              "d"                                   "y"
     yank



                                         List
~
                                                (
              'tildeop'a


            Visual



I                                                        Insert


A                                  Insert



a
                     'tildeop'                  g~




            |usr 05.txt|               Vim
                  |manual-copyright| vim:tw=78:ts=8:ft=help:norl:




                                          88
89                                                       05               Vim

*usr 05.txt*                             Vim 7.0 .           2007 05 11




         VIM                  ---              Bram Moolenaar

                                               Vim



                             "       "               "        "


      Vim                                                         Vim
                      plugin

|05.1|      vimrc
|05.2|      vimrc
|05.3|
|05.4|              plugin
|05.5|
|05.6|
|05.7|


               |usr 06.txt|
               |usr 04.txt|
               |usr toc.txt|




*05.1*      vimrc                                             *vimrc-intro*




                                                     vimrc          Vim


                                 vimrc     (
  )                    :



                                          89
90                                                           05            Vim

                                 ex command
:$MYVIMRC



                                vimrc                 |vimrc|
                             ":version"                Vim


         Unix Macintosh                          --
                                       List
~/.vimrc



         MS-DOS MS-Windows
                                       List
$HOME/_vimrc
$VIM/_vimrc



       vimrc
                                                Vim               'incsearch'
                                       vimrc
                                 ex command
set incsearch



                                      Vim
                     Vim

                                                                   vim
     |usr 41.txt|




*05.2*       vimrc                                     *vimrc example.vim*

                                       vimrc           (             Vim
     ) Vim           not-compatible         (    |not-compatible|)


                                       List
$VIMRUNTIME/vimrc_example.vim


                                        90
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册
vim手册

Contenu connexe

Dernier

Centering equity and the community in Transportation by Richard Ezike
Centering equity and the community in Transportation by Richard EzikeCentering equity and the community in Transportation by Richard Ezike
Centering equity and the community in Transportation by Richard EzikeForth
 
Environmental and Climate Justice Programby Karen Campblin
Environmental and Climate Justice Programby Karen CampblinEnvironmental and Climate Justice Programby Karen Campblin
Environmental and Climate Justice Programby Karen CampblinForth
 
Building a Budget by Jeff Allen and Josh Rodriguez
Building a Budget by Jeff Allen and Josh RodriguezBuilding a Budget by Jeff Allen and Josh Rodriguez
Building a Budget by Jeff Allen and Josh RodriguezForth
 
Centering Equity Presentation by Brenna Rivett
Centering Equity Presentation by Brenna RivettCentering Equity Presentation by Brenna Rivett
Centering Equity Presentation by Brenna RivettForth
 
Centering Equity and Community in Transportation by Benito Perez
Centering Equity and Community in Transportation by Benito PerezCentering Equity and Community in Transportation by Benito Perez
Centering Equity and Community in Transportation by Benito PerezForth
 
Commercial Extractor fan repair services
Commercial Extractor fan repair servicesCommercial Extractor fan repair services
Commercial Extractor fan repair servicesmb1294198
 
IDMPO link slot online mudah menang 2024
IDMPO link slot online mudah menang 2024IDMPO link slot online mudah menang 2024
IDMPO link slot online mudah menang 2024idmpo grup
 
Design and Fund Equitable Electric Transportation For Communities by Jasmine ...
Design and Fund Equitable Electric Transportation For Communities by Jasmine ...Design and Fund Equitable Electric Transportation For Communities by Jasmine ...
Design and Fund Equitable Electric Transportation For Communities by Jasmine ...Forth
 
Transportation Electrification Funding Strategy.pptx
Transportation Electrification Funding Strategy.pptxTransportation Electrification Funding Strategy.pptx
Transportation Electrification Funding Strategy.pptxForth
 
USDA’s EV Charging Infrastructure Solutions by Chris McLean
USDA’s EV Charging Infrastructure Solutionsby Chris McLeanUSDA’s EV Charging Infrastructure Solutionsby Chris McLean
USDA’s EV Charging Infrastructure Solutions by Chris McLeanForth
 
Nosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdf
Nosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdfNosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdf
Nosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdfJulia Kaye
 
Equity Lab: Inked with Intent by The Greenlining Institute
Equity Lab: Inked with Intent by The Greenlining InstituteEquity Lab: Inked with Intent by The Greenlining Institute
Equity Lab: Inked with Intent by The Greenlining InstituteForth
 
Myrtle Beach's Premier BMW Check Engine Light Diagnostics and Repairs
Myrtle Beach's Premier BMW Check Engine Light Diagnostics and RepairsMyrtle Beach's Premier BMW Check Engine Light Diagnostics and Repairs
Myrtle Beach's Premier BMW Check Engine Light Diagnostics and RepairsEuro Pro
 
Building a Future Where Everyone Can Ride and Drive Electric by Linda Bailey
Building a Future Where Everyone Can Ride and Drive Electric by Linda BaileyBuilding a Future Where Everyone Can Ride and Drive Electric by Linda Bailey
Building a Future Where Everyone Can Ride and Drive Electric by Linda BaileyForth
 
Program Design by Prateek Suri and Shakaya Cooper
Program Design by Prateek Suri and Shakaya CooperProgram Design by Prateek Suri and Shakaya Cooper
Program Design by Prateek Suri and Shakaya CooperForth
 
Lakshitha maduranga CV - for data entry clerck
Lakshitha maduranga CV - for data entry clerckLakshitha maduranga CV - for data entry clerck
Lakshitha maduranga CV - for data entry clerckLakshanMadhushanka3
 
Study on Financing of zero-emission trucks and their infrastructure
Study on Financing of zero-emission trucks and their infrastructureStudy on Financing of zero-emission trucks and their infrastructure
Study on Financing of zero-emission trucks and their infrastructureEuropeanCleanTruckin
 

Dernier (19)

Centering equity and the community in Transportation by Richard Ezike
Centering equity and the community in Transportation by Richard EzikeCentering equity and the community in Transportation by Richard Ezike
Centering equity and the community in Transportation by Richard Ezike
 
Environmental and Climate Justice Programby Karen Campblin
Environmental and Climate Justice Programby Karen CampblinEnvironmental and Climate Justice Programby Karen Campblin
Environmental and Climate Justice Programby Karen Campblin
 
Building a Budget by Jeff Allen and Josh Rodriguez
Building a Budget by Jeff Allen and Josh RodriguezBuilding a Budget by Jeff Allen and Josh Rodriguez
Building a Budget by Jeff Allen and Josh Rodriguez
 
Centering Equity Presentation by Brenna Rivett
Centering Equity Presentation by Brenna RivettCentering Equity Presentation by Brenna Rivett
Centering Equity Presentation by Brenna Rivett
 
Centering Equity and Community in Transportation by Benito Perez
Centering Equity and Community in Transportation by Benito PerezCentering Equity and Community in Transportation by Benito Perez
Centering Equity and Community in Transportation by Benito Perez
 
Commercial Extractor fan repair services
Commercial Extractor fan repair servicesCommercial Extractor fan repair services
Commercial Extractor fan repair services
 
IDMPO link slot online mudah menang 2024
IDMPO link slot online mudah menang 2024IDMPO link slot online mudah menang 2024
IDMPO link slot online mudah menang 2024
 
Design and Fund Equitable Electric Transportation For Communities by Jasmine ...
Design and Fund Equitable Electric Transportation For Communities by Jasmine ...Design and Fund Equitable Electric Transportation For Communities by Jasmine ...
Design and Fund Equitable Electric Transportation For Communities by Jasmine ...
 
Transportation Electrification Funding Strategy.pptx
Transportation Electrification Funding Strategy.pptxTransportation Electrification Funding Strategy.pptx
Transportation Electrification Funding Strategy.pptx
 
USDA’s EV Charging Infrastructure Solutions by Chris McLean
USDA’s EV Charging Infrastructure Solutionsby Chris McLeanUSDA’s EV Charging Infrastructure Solutionsby Chris McLean
USDA’s EV Charging Infrastructure Solutions by Chris McLean
 
Nosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdf
Nosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdfNosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdf
Nosfdsfsdfasdfasdfasdfsadf asdfasdfasdfasdf
 
Equity Lab: Inked with Intent by The Greenlining Institute
Equity Lab: Inked with Intent by The Greenlining InstituteEquity Lab: Inked with Intent by The Greenlining Institute
Equity Lab: Inked with Intent by The Greenlining Institute
 
Myrtle Beach's Premier BMW Check Engine Light Diagnostics and Repairs
Myrtle Beach's Premier BMW Check Engine Light Diagnostics and RepairsMyrtle Beach's Premier BMW Check Engine Light Diagnostics and Repairs
Myrtle Beach's Premier BMW Check Engine Light Diagnostics and Repairs
 
Building a Future Where Everyone Can Ride and Drive Electric by Linda Bailey
Building a Future Where Everyone Can Ride and Drive Electric by Linda BaileyBuilding a Future Where Everyone Can Ride and Drive Electric by Linda Bailey
Building a Future Where Everyone Can Ride and Drive Electric by Linda Bailey
 
Program Design by Prateek Suri and Shakaya Cooper
Program Design by Prateek Suri and Shakaya CooperProgram Design by Prateek Suri and Shakaya Cooper
Program Design by Prateek Suri and Shakaya Cooper
 
Reinventing the Car - as I reported it in 1985!
Reinventing the Car - as I reported it in 1985!Reinventing the Car - as I reported it in 1985!
Reinventing the Car - as I reported it in 1985!
 
EVAT - Future Mobility Transformation in Thailand
EVAT - Future Mobility Transformation in ThailandEVAT - Future Mobility Transformation in Thailand
EVAT - Future Mobility Transformation in Thailand
 
Lakshitha maduranga CV - for data entry clerck
Lakshitha maduranga CV - for data entry clerckLakshitha maduranga CV - for data entry clerck
Lakshitha maduranga CV - for data entry clerck
 
Study on Financing of zero-emission trucks and their infrastructure
Study on Financing of zero-emission trucks and their infrastructureStudy on Financing of zero-emission trucks and their infrastructure
Study on Financing of zero-emission trucks and their infrastructure
 

En vedette

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

En vedette (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

vim手册

  • 1. 1 __ ___ ___ ____ ____ | | / / / / / | / | | || / / / /__/ / / || / || | || / / / __/ / /| || / /| || | || / / / ___ / / | || / / | || | || / / / / / / / /| || / / /| || | || / / / / / / / / / | ||/ / / | || | || / / / / / / / / / | |/ / / | || | || / / / / / / / / / | / / | || | || / / / / / / / / / | / / | || | ||/ / / / / / / / / | / / | || | |/ / / / / / / / / |__/ / | || | / / / / / / / / __/ | || | / / / / / / / / | || | / / / / / / / / | || |__/ / /__/ / /__/ / |__|| __/ __/ __/ __| Bram Moolenaar ZhaoRuFei<slimzhao@hotmail.com> 7.2 1
  • 2. 2 Vim Vim Vim Vim Vim Vim Vim 1 Vim notepad, word, edit Vim BUG Vim( vi) Vim Vim 1 Emacs 2
  • 3. 3 Vim notepad, edit UNIX :help xxx Mission Impossible Vim 1 i18n internationalization Vim the teh Vim script Vim Vim Vim SHELL Vim Vim Vim Vim LTEX A LTEX A email <slimzhao@hotmail.com> 1 " " " " 3
  • 4. 4 The Vim user manual and reference manual are Copyright (c) 1988-2002 by Bram Moolenaar. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later. The latest version is presently available at: http://www.opencontent.org/openpub/ People who contribute to the manuals must agree with the above copyright notice. Vim <slimzhao@hotmail.com> 2004/06/08 4
  • 5. 5 Acrobat Reader 5
  • 6. 6 0.2 0.2 0.2 0.1 2 ( ). Acrobat Acrobat Reader 5 6 3 4 =============== =============== % (<qzhen@flotu.org>) gbk2uni.exe CTex 6
  • 7. 7 6.3.0 6.3.0 1. 6.3.0 VIM 6.3, 6.1 2. 6.3.0 0.2 (A) 0.1 0.2 usr 21.txt, usr 22.txt, usr 29.txt, usr 45.txt 4 4 (B) shell ex command :au BufRead *.tip setf tip 7 Vim ex command 6 normal mode command Vim normal normal mode command gg=G shell command unix shell windows OS DOS BOX shell command env LANG=de_DE.ISO_8859-1 vim Display 7
  • 8. 8 6.3.0 Display :!make | &tee /tmp/vim215953.err gcc -g -Wall -o prog main.c sub.c main.c: In function 'main': main.c:6: too many arguments to function 'do_sub' main.c: At top level: main.c:10: parse error before '}' make: *** [prog] Error 1 2 returned "main.c" 11L, 111C (3 of 6): too many arguments to function 'do_sub' Hit ENTER or type command to continue List List r Insert o Normal "o" "O" c 'textwidth' code code while i < b { if a { b = c; } } url URL http://www.cl.cam.ac.uk/~mgk25/download/ucs-fonts.tar.gz (C) cmtt computer modern typewriter cmr(computer modern roman) Latex L TEX A cmr cmtt LTEX A A 1 1 <unicell@gmail.com> " " " " " ; " 8
  • 9. 9 6.3.0 (D) URL email mail (E) ‘‘...’’(LTEX A ), ... "..." ’ ' /hello hi hi (F) CTRL-N, <Esc> (G) BUG 1 / ... (H) PDF HTML HTML bgcolor PDF PDF Tex 2 PL (Public License Piao Liang) windows 3. TODO: upquote LTEX package A ’ ' fancyvrb " " " " . 1 " " " " . 2 PDF 9
  • 10. 10 6.3.0 --- LTEX A TMD 10
  • 11. 11 7.0 7.0 0. 7.0 " " Bram Beta 7.0f Beta 7.0 " " 7.0 release 7.0 1. List - 50 - :Omni - - - Vim ( Python ) - Vim - Unicode - - - grep - zip/tar - --- http://groups.yahoo.com/group/vimannounce/message/159 2. , , VIM :colorscheme default, |41.1| | , . | . 3. , , , . 11
  • 12. 12 7.1 7.1 7.1 7.0 bugfix bugfix shell command cd $VIM/vim71/doc for i in usr*; do diff ../../vim70/doc/$i $i; done > tmp.txt wc tmp.txt 366 Display 1c1 < *usr_01.txt* For Vim version 7.1. Last change: 2006 Oct 08 --- > *usr_01.txt* For Vim version 7.0. Last change: 2006 Apr 24 132 (A) |02.8| ( ) (B) |10.2| ":substitute" p p (C) |12.1| "fourty" "fourteen" fourty (D) |24.3| Omni (E) |41.10| Comments Unix Vim Vim shell 12
  • 13. 13 7.1 1. 1.5 2. LTEX A LTEX A LTEX A 3. Mail " ... " " ... " 11,300,000 23,600,000 google :-) " " " " 1986 " " " " " ... " " ... " <step by step@263.net> Mail 13
  • 14. 14 7.1 :-) LTEX A 14
  • 15. 15 7.2 7.2 7.2 7.2 7.1 7.1 7.0 bugfix 7.2 | 7.1 | 15
  • 16. 16 LTEX A LTEX A 0. LTEX A <slimzhao@hotmail.com> LTEX A * 1*. fancyvrb Verbatim a b a 7.1 b 7.1 2*. fancyvrb Verbatim Verbatim xleftmargin xrightmargin 16
  • 17. 17 LTEX A 3*. CJK " " "s:count" "other.vim" 1 COPY sloppy LTEX A / "s:count" "other.vim" 4*. : EMAIL slimzhao@21cn.com " a" CopyRight c LTEX A marvosym MVAt @ MAIL : L TEX A newcommand{VimMailURL}[1] {textcolor{VimURLColor}{href{mailto:#1}{#1} } email VimMailURL #1 @ MVAt. 1 Vim C/C++/Java "[a-zA-Z ][a-zA-Z0-9 ]*" 17
  • 18. 18 LTEX A L TEX A newcommand{VimMailURL}[2]{ texttt{<}textcolor{VimURLColor}{href{mailto:#1@#2} {#1{footnotesizeMVAt}#2}}texttt{>}} Vim VimMailURL{xxx}{yyy.zzz} 5. LTEX A 6.3 18
  • 19. 19 LaTeX LTEX A LTEX A <rice maxwell@163.com> <chunmin.yang@gmail.com> LTEX A TEX/LTEX A PDF LTEX A LTEX A PDF TEX LTEX A LTEX A .zip CTeX 19
  • 20. 20 0. <002424@fudan.edu.cn> PDF Acrobat Reader Acrobat 7 -> ( CTRL-K) check box RGB (255,255,242). 1. <laneast@hotmail.com> HTML Txt HTML LTEX A docbook 2. <chunmin.yang@gmail.com> Vim 3. <chenbo.liu@gmail.com> PDF j k Acrobat Reader 4. (<taker2001@gmail.com>, <chunlinyao@gmail.com>, <chunmin.yang@gmail.com> ) Vim Vim 90% 90% bash : 20
  • 21. 21 shell command for i in usr*; do diff ../../vim70c/doc/$i $i; done > tmp.txt gvim tmp.txt & 7.0 5. MAIL : <002424@fudan.edu.cn> <ankyhe@gmail.com> <baikaishiuc@hotmail.com> <chenbo.liu@gmail.com> <chunlinyao@gmail.com> <chunmin.yang@gmail.com> <huanlf@gmail.com> <KDV367@motorola.com> <laneast@hotmail.com> <livahu@gmail.com> <lsl635@sina.com> <maintainer@vim.org> <rice maxwell@163.com> <ringken@gmail.com> <step by step@263.net> <taker2001@gmail.com> <unicell@gmail.com> <xyzguy@126.com> <yangxcmail-linux@yahoo.com.cn> <zhasm64@gmail.com> sort -f| uniq -i mail 6. MAIL 21
  • 22. 22 00 *usr toc.txt* Vim 7.0 . 2006 04 24 VIM --- Bram Moolenaar <slimzhao@hotmail.com> *user-manual* |usr 01.txt| |usr 02.txt| Vim |usr 03.txt| |usr 04.txt| |usr 05.txt| Vim |usr 06.txt| |usr 07.txt| |usr 08.txt| |usr 09.txt| GUI |usr 10.txt| |usr 11.txt| |usr 12.txt| |usr 20.txt| |usr 21.txt| |usr 22.txt| 22
  • 23. 23 00 |usr 23.txt| |usr 24.txt| |usr 25.txt| |usr 26.txt| |usr 27.txt| |usr 28.txt| |usr 29.txt| |usr 30.txt| |usr 31.txt| GUI |usr 32.txt| Vim |usr 40.txt| |usr 41.txt| Vim |usr 42.txt| |usr 43.txt| |usr 44.txt| |usr 45.txt| Vim |usr 90.txt| Vim |ref-manual.txt| HTML PDF http://vimdoc.sf.net 23
  • 24. 24 00 Vim |usr 01.txt| |01.1| |01.2| |01.3| Vim |01.4| |usr 02.txt| Vim |02.1| Vim |02.2| |02.3| |02.4| |02.5| |02.6| |02.7| |02.8| |usr 03.txt| |03.1| Word |03.2| |03.3| |03.4| |03.5| |03.6| |03.7| |03.8| |03.9| |03.10| 24
  • 25. 25 00 |usr 04.txt| |04.1| |04.2| |04.3| |04.4| Visual |04.5| |04.6| |04.7| |04.8| |04.9| |04.10| |usr 05.txt| Vim |05.1| vimrc |05.2| vimrc |05.3| |05.4| plugin |05.5| |05.6| |05.7| |usr 06.txt| |06.1| |06.2| ? |06.3| |06.4| |06.5| |06.6| |usr 07.txt| |07.1| |07.2| 25
  • 26. 26 00 |07.3| |07.4| |07.5| |07.6| |07.7| |usr 08.txt| |08.1| |08.2| |08.3| |08.4| |08.5| |08.6| |08.7| vimdiff |08.8| |usr 09.txt| GUI |09.1| GUI |09.2| |09.3| |09.4| |usr 10.txt| |10.1| |10.2| |10.3| |10.4| |10.5| |10.6| |10.7| |10.8| |10.9| 26
  • 27. 27 00 |usr 11.txt| |11.1| |11.2| ? |11.3| ? |11.4| |usr 12.txt| |12.1| word |12.2| "Last, First" "First Last" |12.3| |12.4| |12.5| 1 |12.6| |12.7| |12.8| word |usr 20.txt| |20.1| |20.2| |20.3| |20.4| |20.5| |usr 21.txt| 1 Unix 27
  • 28. 28 00 |21.1| |21.2| shell |21.3| viminfo |21.4| |21.5| |21.6| |usr 22.txt| |22.1| |22.2| |22.3| |22.4| |usr 23.txt| |23.1| DOS, Mac Unix |23.2| |23.3| |23.4| |23.5| |usr 24.txt| |24.1| |24.2| |24.3| |24.4| |24.5| |24.6| |24.7| |24.8| |24.9| |24.10| Normal 28
  • 29. 29 00 |usr 25.txt| 1 |25.1| |25.2| |25.3| |25.4| |25.5| |usr 26.txt| |26.1| Visual |26.2| |26.3| |26.4| shell Vim |usr 27.txt| |27.1| |27.2| |27.3| |27.4| |27.5| |27.6| |27.7| |27.8| |27.9| |usr 28.txt| |28.1| ? |28.2| |28.3| |28.4| 1 <unicell@gmail.com> ! 29
  • 30. 30 00 |28.5| |28.6| |28.7| |28.8| |28.9| |28.10| ? |usr 29.txt| |29.1| tags |29.2| |29.3| |29.4| |29.5| |usr 30.txt| |30.1| |30.2| C |30.3| |30.4| |30.5| |30.6| |usr 31.txt| GUI |31.1| |31.2| |31.3| |31.4| Vim |31.5| |usr 32.txt| 30
  • 31. 31 00 |32.1| |32.2| |32.3| Vim Vim |usr 40.txt| |40.1| |40.2| |40.3| |usr 41.txt| Vim |41.1| |41.2| |41.3| |41.4| |41.5| |41.6| |41.7| |41.8| |41.9| |41.10| |41.11| plugin |41.12| plugin |41.13| plugin |41.14| plugin |41.15| |41.16| Vim |usr 42.txt| 31
  • 32. 32 00 |42.1| |42.2| |42.3| |42.4| |usr 43.txt| |43.1| |43.2| |usr 44.txt| |44.1| |44.2| |44.3| |44.4| |44.5| |44.6| |44.7| |44.8| |44.9| |44.10| |44.11| |44.12| |usr 45.txt| |45.1| |45.2| |45.3| |45.4| |45.5| 32
  • 33. 33 00 Vim Vimming |usr 90.txt| Vim |90.1| Unix |90.2| MS-Windows |90.3| |90.4| |90.5| Vim |manual-copyright| vim:tw=78:ts=8:ft=help:norl: 33
  • 34. 34 01 *usr 01.txt* Vim 7.0 . 2008 05 07 VIM --- Bram Moolenaar Vim Vim |01.1| |01.2| |01.3| Vim |01.4| |usr 02.txt| |usr toc.txt| *01.1* Vim 1. 2. Vim |notation| 1 : 1 Vim HTML <a href=#somewhere>click here</a> click here "click here" Vim CTRL-] CTRL-] 34
  • 35. 35 01 List CTRL-] CTRL-O |bars| 'number', ":write" CTRL-] CTRL-] ":help" |help.txt|. *01.2* Vim ( GUI ) |usr 90.txt| *not-compatible* Vi Vim Vi vimrc VIM Unix: ex command :!cp -i $VIMRUNTIME/vimrc_example.vim ~/.vimrc MS-DOS, MS-Windows, OS/2: ex command :!copy $VIMRUNTIME/vimrc_example.vim $VIM/_vimrc Amiga: ex command :!copy $VIMRUNTIME/vimrc_example.vim $VIM/.vimrc Vim, 'compatible' 35
  • 36. 36 01 ex command :set compatible? 'nocompatible' "compatible" ex command :scriptnames 'compatible' |vimrc| |compatible-default| : Vim "evim"(easy vim) Vim Notepad Insert |evim-keys| *01.3* Vim ( !) vimtutor Vim 30 Unix Vim shell command vimtutor MS-Windows " /Vim" $VIMRUNTIME vimtutor.bat. 36
  • 37. 37 01 shell command vimtutor fr Unix , Vim, "gvimtutor" "vimtutor -g" "vimtutor". OpenVMS VIM shell command @ VIM:vimtutor 1. VIM ( ): shell command vim -u NONE -c 'e $VIMRUNTIME/tutor/tutor' -c 'w! TUTORCOPY' -c 'q' "TUTORCOPY" shell command vim -u NONE -c 'e $VIMRUNTIME/tutor/tutor.fr' -c 'w! TUTORCOPY' -c 'q' 2. Vim shell command vim -u NONE -c "set nocp" TUTORCOPY Vim happy 3. shell command del TUTORCOPY *01.4* *manual-copyright* 37
  • 38. 38 01 Vim c 1988-2003 by Bram Moolenaar " "1.0 http://www.opencontent.org/opl.shtml *frombook* Steve Oualline Vi IMproved - Vim ( New Riders ISBN:0735710015). " " ( Vim 6.0 ) |frombook| Steve Oualline New Riders OPL |iccf| |usr 02.txt| |manual-copyright| vim:tw=78:ts=8:ft=help:norl: 38
  • 39. 39 02 Vim *usr 02.txt* Vim 7.0 . 2007 02 28 VIM --- Bram Moolenaar Vim 1 --- << >> Vim |02.1| Vim |02.2| |02.3| |02.4| |02.5| |02.6| |02.7| |02.8| |usr 03.txt| |usr 01.txt| |usr toc.txt| *02.1* Vim shell command gvim file.txt 1 39
  • 40. 40 02 Vim Vim. UNIX Microsoft Windows, MS-DOS Vim file.txt Display +---------------------------------------+ |# | |~ | |~ | |~ | |~ | |"file.txt" [New file] | +---------------------------------------+ ("#" .) (~) Vim file.txt VIM gvim shell command vim file.txt xterm xterm Microsoft Windows MS-DOS gvim *02.2* Vim Normal Insert Normal 40
  • 41. 41 02 Vim Insert Vim Normal Insert "i" (i Insert) Display iA very intelligent turtle Found programming UNIX a hurdle "turtle" <Esc> Insert Normal Vim Display +---------------------------------------+ |A very intelligent turtle | |Found programming UNIX a hurdle | |~ | |~ | | | +---------------------------------------+ ex command :set showmode ( ) ( ). "i" Vim --INSERT-- Insert 41
  • 42. 42 02 Vim Display +---------------------------------------+ |A very intelligent turtle | |Found programming UNIX a hurdle | |~ | |~ | |-- INSERT -- | +---------------------------------------+ <Esc> Normal 1 "--INSERT--" Vim --- <Esc> Normal ( Normal ) <Esc> Vim 2 Normal *02.3* Normal List h j k l l right ( ) 1 Normal --NORMAL-- 2 google 42
  • 43. 43 02 Vim : hjkl h l j k h l j "i" Insert hjkl <Esc> Normal |vimtutor| Hiroshi Iwatani Display Komsomolsk ^ | Huan Ho <--- ---> Los Angeles (Yellow river) | v Java (the island, not the programming language) *02.4* "x". ( xxxx ) xxxxxxx(7 x) "A very " 43
  • 44. 44 02 Vim Display +---------------------------------------+ |intelligent turtle | |Found programming UNIX a hurdle | |~ | |~ | | | +---------------------------------------+ Display iA young <Esc> i( Insert ) "A young" Insert ( <Esc>) Display +---------------------------------------+ |A young intelligent turtle | |Found programming UNIX a hurdle | |~ | |~ | | | +---------------------------------------+ "dd" Display +---------------------------------------+ |Found programming UNIX a hurdle | |~ | |~ | |~ | | | +---------------------------------------+ Vim "J" 44
  • 45. 45 02 Vim Display A young intelligent turtle "J": Display A young intelligent turtle *02.5* "u" 1 "dd" "u" A Display A young intelligent turtle xxxxxxx "A young" Display intelligent turtle "u" g Display g intelligent turtle u Display ng intelligent turtle u 1 ... 45
  • 46. 46 02 Vim Display ung intelligent turtle oung intelligent turtle young intelligent turtle young intelligent turtle A young intelligent turtle : "u" Vim Vi |not-compatible| Vim Vim Vi CTRL-R( ) CTRL-R A Display young intelligent turtle "U" "U" Display A very intelligent turtle xxxx very A intelligent turtle xxxxxx turtle A intelligent "U" A very intelligent turtle "u" "U" A intelligent "U" "u" CTRL-R 46
  • 47. 47 02 Vim "u" CTRL-R |32.1| *02.6* Vim |Q in| "i" "a" "i" Display and that's not saying much for the turtle. Display and that's not saying much for the turtle!!! "x" turtle e normal mode command a!!!<Esc> e Display and that's not saying much for the turtle!!! "o" Insert Display A very intelligent turtle Found programming UNIX a hurdle 47
  • 48. 48 02 Vim "o" normal mode command oThat liked using Vim<Esc> Display A very intelligent turtle That liked using Vim Found programming UNIX a hurdle "O" ( O) 9 "kkkkkkkkk" "9k" "a!!!<Esc>" "3a!<Esc>" 3 3 3 "3x" *02.7* Vim "ZZ" Vim. : Vim "ZZ", Vim Vim |07.4| Vim ex command :q! 48
  • 49. 49 02 Vim 3 (:) q 1 2 (.!) Vim ":q" Vim Display E37: No write since last change (use ! to override) Vim, " ". ":e!" *02.8* Vim ex command :help <F1> <F1> ":help" Vim ( ) hljk "ZZ" Vim. ( |help|) 1 Vim 2 :! w! 49
  • 50. 50 02 Vim CTRL-]( ) ( Vim CTRL-] word 1 CTRL-T( ) CTRL-O( ) *help.txt* "*" ( ). |29.1| ex command :help {subject} "x" ex command :help x ex command :help deleting Vim ex command :help index ( CTRL-A) "CTRL-" ex command :help CTRL-A 1 HTML HTML <a href="http://www.w3.org/2001/HTML">HTML</a> Vim tag Vim 50
  • 51. 51 02 Vim 1 Vim Normal Normal CTRL-H ex command :help CTRL-H Insert "i " CTRL-H ex command :help i_CTRL-H Vim - -t ex command :help -t Vim 'number' ex command :help 'number' |help-context| Insert ex command :help i_<Up> Display E37: No write since last change (use ! to override) ID 1 Insert Normal 51
  • 52. 52 02 Vim ex command :help E37 ex command :help ( Vim ). ex command :help usr_toc.txt 1 ex command :help :subject "subject" ex command :help :help ex command :help abc normal "abc" ex command :help CTRL-B normal <C-B> ex command :help i_abc :help i_CTRL-B 1 7.1 user-toc.txt 52
  • 53. 53 02 Vim ex command :help v_abc :help v_CTRL-B Visual ex command :help c_abc :help c_CTRL-B ex command :help ’subject’ 'subject' ex command :help subject() "subject" ex command :help -subject 1 "-subject" ex command :help +subject "+subject" ex command :help EventName "EventName" 1 " " shell vim Vim 53
  • 54. 54 02 Vim ex command :help digraphs.txt "digraphs.txt" ex command :help pattern<Tab> "pattern" <Tab> ex command :help pattern<Ctrl-D> "pattern" ex command :helpgrep pattern "pattern" ex command :cn ex command :cprev :cN ex command :cfirst :clast / 54
  • 55. 55 02 Vim ex command :copen :cclose / <Enter> |usr 03.txt| |manual-copyright| vim:tw=78:ts=8:ft=help:norl: 55
  • 56. 56 03 *usr 03.txt* Vim 7.0 . 2006 06 21 VIM --- Bram Moolenaar Vim |Q lr| |03.1| Word |03.2| |03.3| |03.4| |03.5| |03.6| |03.7| |03.8| |03.9| |03.10| |usr 04.txt| |usr 02.txt| |usr toc.txt| *03.1* Word "w" word Vim "w" word "3w" 3 words 56
  • 57. 57 03 Display This is a line with example text --->-->->-----------------> w w w 3w word "w" word "b"1 word Display This is a line with example text <----<--<-<---------<--- b b b 2b b "e"2 word 3 . "w" "b" "e" "ge" 4 word : Display This is a line with example text <- <--- -----> ----> ge ge e e word "w" word "w" "l" "b" non-word ".", "-" ")" word Vim word 'iskeyword' WORDs WORD word WORD word 1 backward 2 :end of word 3 "w" word "e" word 4 "e" word word 57
  • 58. 58 03 Display ge b w e <- <- ---> ---> This is-a line, with special/separated/words (and some more). <----- <----- --------------------> -----> gE B W E *03.2* "$" <End> 1 "^" . "0" <Home> Display ^ <------------ .....This is a line with example text <----------------- ---------------> 0 $ ("....." ) "$" "1$" "2$" "0" "0" "0" 2 "^" *03.3* 1 2 "^" 58
  • 59. 59 03 "fx" x "f" "find" human h "fh" Display To err is human. To really foul up you need a computer. ---------->---------------> fh fy "fy" really "3fl" "foul" "l" Display To err is human. To really foul up you need a computer. ---------------------> 3fl 1 "F" : Display To err is human. To really foul up you need a computer. <--------------------- Fh "tx" "fx" "t" "To" "Tx": Display To err is human. To really foul up you need a computer. <------------ -------------> Th tn 4 ";" "," 2 4 1 : 2 "Fx" "," 59
  • 60. 60 03 1 *03.4* () %2 "(" ")" 3 ")" "(" : Display % <-----> if (a == (b * c) / d) <----------------> % [] {} ( 4 'matchpairs' ) "%" "%" "(", ")": code if (a == (b * c) / d) ---+----------------> % *03.5* C C++ 1 "fx" x "f" Vim Windows 2 (<qzhen@flotu.org>) 3 4 <> HTML, XML 60
  • 61. 61 03 Display prog.c:33: j undeclared (first use in this function) 33 33 "9999k"1 "32j" 32 2 "G" "33G" 33 (|usr 30.txt| :make ) 3 , "G" "gg" "1G" Display | first line of a file ^ | text text text text | | text text text text | gg 7G | text text text text | | text text text text | text text text text V text text text text | text text text text | G text text text text | last line of a file V 4 "%" . 5 "50%" . "90%" 6 1 9999 C/C++ Vim 2 G Go 3 Vim 4 : N 5 50% 6 Vim :goto 3 61
  • 62. 62 03 Display +---------------------------+ H --> | text sample text | | sample text | | text sample text | | sample text | M --> | text sample text | | sample text | | text sample text | | sample text | L --> | text sample text | +---------------------------+ "H" Home, "M" Middle, "L" Last. *03.6* 1. CTRL-G ( 'ruler' ): Display "usr_03.txt" line 233 of 650 --35%-- col 45-52 - "col 2-9" 8 9. 1 2. 'number' ex command :set number 1 62
  • 63. 63 03 1 2 : ex command :set nonumber 'number' "no" Vim 3. 'ruler' Vim ex command :set ruler 'ruler' 3 *03.7* CTRL-U CTRL-D 1 " " <xyzguy@126.com> 2 :no boolean 3 Vim set number :set nonumber ruler number |gq| 63
  • 64. 64 03 Display +----------------+ | some text | | some text | | some text | +---------------+ | some text | | some text | CTRL-U --> | | | | | 123456 | | 123456 | +----------------+ | 7890 | | | +----------------+ | example | CTRL-D --> | 7890 | +---------------+ | | | example | | example | | example | | example | +----------------+ CTRL-E( ) CTRL-Y( ) CTRL-E Extra. ( MS-Windows CTRL-Y ). ( ) CTRL-F 1 2 CTRL-B CTRL-F CTRL-B "j" "zz" 1 Forward 2 Backward 64
  • 65. 65 03 Display +------------------+ +------------------+ | some text | | some text | | some text | | some text | | some text | | some text | | some text | zz --> | line with cursor | | some text | | some text | | some text | | some text | | line with cursor | | some text | +------------------+ +------------------+ 1 2 "zt" "zb" |Q sc| 'scrolloff' *03.8* "/string" "include" normal mode command /include 3 "/" Vim : .*[]^%/?~$ "n" #include: 1 "zt" t top z zt Zhuan Tie( ) :-) 2 "b" bottom 3 Vim 65
  • 66. 66 03 normal mode command /#include "n" #include "n" "3n" 3 "/" 1 2 "?" "/" : normal mode command ?word "N" "/" "?" "/" "N" "?" "N" 'ignorecase' ex command :set ignorecase "word" "Word" "WORD" ex command :set noignorecase 1 normal / N N / /text n N / N : a 1 b a 2 b a 3 b a 4 b a 5 b a 6 b normal 1 2/d 3 2 n 4 2 Vim 66
  • 67. 67 03 3 normal mode command /one /two /three "/" Vim "/three" "three" Vim "/two" "/one" "/o<Up>"1 Vim "/one" ":" WORD word "TheLongFunctionName" "/TheLongFunctionName" Vim word "*" Vim word 2 "#" "*" :"3*" word WORD "/the" Vim "there" "the" 1 <Up> 2 : word ? Visual select, yank, :let @ /=@", n 67
  • 68. 68 03 normal mode command /the> ">"1 word "<" 2 word word "the" normal mode command /<the> "there" "soothe". "*" "#" word word( "g*" "g#" word .) "nr" "nr" "*" "n" ex command :set hlsearch "nr", Vim 3 ex command :set nohlsearch 4 : ex command :nohlsearch 1 <qujianning@gmail.com> > 2 word 0 3 |/%<3l| 4 'hlsearch' 68
  • 69. 69 03 'hlsearch' "n" "N" ex command :set incsearch Vim ex command :set nowrapscan 'wrapscan' 1 Vim Vim |not-compatible| ex command :scriptnames ex command :edit ~/.vimrc Vim ex command Go:set hlsearch<Esc> 1 <qujianning@gmail.com> INTERMEZZO 69
  • 70. 70 03 "G" "o" ":set" <Esc> normal mode command ZZ Vim 'hlsearch' *03.9* Vim |usr 27.txt|. |pattern| ^ 1 6 "include" include "^include" include. $ "was$" was. "x" "the" Display the solder holding one of the chips melted and the xxx xxx xxx "/the$" Display the solder holding one of the chips melted and the xxx "^the" 1 70
  • 71. 71 03 Display the solder holding one of the chips melted and the xxx "/^the$" "the" "the " . "c.m" 1 c m Display We use a computer that became the cummin winter. xxx xxx xxx "ter." Display We use a computer that became the cummin winter. xxxx xxxx "ter." 2 *03.10* "G" Vim Vim normal mode command `` 1 l 71
  • 72. 72 03 1 ` ` "/" "n" ( ) "fx" "tx" word "w" "e" "j" "k" `` CTRL-O ( O older). CTRL-I ( I O ) 3 normal mode command 33G /^The CTRL-O 2 33 "The" CTRL-O 33 CTRL-O "33G" CTRL-I 33 CTRL-I "/^The" Display | example text ^ | 33G | example text | CTRL-O | CTRL-I | example text | | V line 33 text ^ V | example text | | /^The | example text | CTRL-O | CTRL-I V There you are | V example text 1 ' ` 1 2 " " 72
  • 73. 73 03 : CTRL-I <Tab> ":jumps" ">" Vim "ma" "a" a z 26 Vim `{mark}, {mark} normal mode command `a 'mark( ) mark `mark `mark mark s(start) normal mode command ms e(end) normal mode command me normal mode command 's '' 'e e 73
  • 74. 74 03 1 2 s e ex command :marks List ' " [ ] |usr 04.txt| |manual-copyright| vim:tw=78:ts=8:ft=help:norl: 1 start 2 end 74
  • 75. 75 04 *usr 04.txt* Vim 7.0 . 2006 06 21 VIM --- Bram Moolenaar --- 3 Visual |04.1| |04.2| |04.3| |04.4| Visual |04.5| |04.6| |04.7| |04.8| |04.9| |04.10| 1 |usr 05.txt| Vim |usr 03.txt| |usr toc.txt| *04.1* 2 "x" "4x" 4 "dw" word "w" word "d" 75
  • 76. 76 04 "4w" 4 word "d4w" 4 word. Display To err is human. To really foul up you need a computer. ------------------> d4w To err is human. you need a computer. Vim Vim word "e" word 1 Vim : Display To err is human. you need a computer. --------> d2e To err is human. a computer. " " 2 " " "$" "d$" " " Display To err is human. a computer. ------------> d$ To err is human + "d" "4l" "w" 1 2 exclusive inclusive [0, 5) 0≤x<5 [0, 5] 0≤x≤5 . 76
  • 77. 77 04 *04.2* "c" "d" Insert "cw" word word Insert Display To err is human -------> c2wbe<Esc> To be human "c2wbe<Esc>" List c 2w word( Insert ) be <Esc> Normal "human" "cw" "c" d :"cw", "ce" word word Vi Vim 1 "dd" "cc" ( ). "d$" "c$" "d$" "a" Insert 1 : 77
  • 78. 78 04 + List x dl( ) X dh( ) D d$( ) C c$( ) s cl( ) S cc( ) "3dw" "d3w" 3 word "3dw" word 3 "d3w" 3 word "3d2w" word 3 6 word. "r" "cl" "s" "r" <Esc> Normal Display there is somerhing grong here rT rt rw There is something wrong here "r" Display There is something wrong here 5rx There is something xxxxx here 78
  • 79. 79 04 "r<Enter>" 1 "4r<Enter>" 4 *04.3* "." Vim HTML <B> <B> < "df>" </B> < "." "." ( "df>") < "." Display To <B>generate</B> a table of <B>contents f< < ---> df> > --> f< < ---------> . df> ---> f< < -------------> . df> --> "." "u" CTRL-R ( "." Normal Display asdf 123 asdf 1234 1 "cwxyz" Normal Display asdf xyz 1 Display asdf xyz 1 79
  • 80. 80 04 Display asdf xyz4 3 xyz.) "four" "five" List /four<Enter> "four" cwfive<Esc> "five" n "four" . "five" n . *04.4* Visual + Visual "v" Visual Display This is an examination sample of visual mode ----------> velllld This is an example of visual mode "l" "d" <Esc> Visual 80
  • 81. 81 04 "V" Visual "Vjj" 3 Display +------------------------+ | text more text | >> | more text more text | | selected lines >> | text text text | | Vjj >> | text more | V | more text more | +------------------------+ CTRL-V Visual Display name Q1 Q2 Q3 pierre 123 455 234 john 0 90 39 steve 392 63 334 "Q2" "Q2" "Q" CTRL-V Visual "3j" 3 "w" word "h" "d" Visual "o" ( o other end ) "o" 4 "o" "O" 81
  • 82. 82 04 1 "o" "O" Visual Normal Normal *04.5* "d" "x" p ( Vim put) "dd" "p" Display a line a line a line line 2 dd line 3 p line 3 line 3 line 2 "p" ( word), 2 "p" Display Some more boring try text to out commands. ----> dw Some more boring text to out commands. --------> welp Some more boring text to try out commands. PUTTING "P" "p" 1 4 2 82
  • 83. 83 04 "dd" "P" 1 "dw" "P" "p" "P" "dd" "3p" 3 ( ) "the" "teh" Vim "teh" e "xp" "x" e "p" e h Display teh th the x p *04.6* "u" "p" yanking 2 . "y" 3 "p" Yanking Vim "c" 4 , "y" "yank" "y" "y" "yw" word. "y2w" word: 1 2 term:yanking 3 " " (") 4 change copy 83
  • 84. 84 04 Display let sqr = LongVariable * --------------> y2w let sqr = LongVariable * p let sqr = LongVariable * LongVariable "yw" word "ye" "yy" "dd" "D" "Y" "y$" Display a text line yy a text line a text line line 2 line 2 p line 2 last line last line a text line last line *04.7* Vim GUI (gvim) "Edit" "Copy" Visual Edit/Copy 1 Vim . Vim Edit/Paste Normal Insert Visual 1 Copy Normal yank Copy Vim *, y Vim " Vim 84
  • 85. 85 04 "Cut" "Copy", "Cut" "Paste" ( ) Vim GUI "y"(yank) "p"(put) "*( ) normal mode command "*yy normal mode command "*p Vim |09.3| |clipboard| *04.8* "dw" "daw" 1 Display this is some example text. daw this is some text. "daw" "d" "aw" "aw" "A Word" "daw" "Delete A Word" Word ( ). 1 Vim Perl There is more than one way to do the same thing. <huanlf@gmail.com> PERL Perl Perl perl : perl Perl PERL Perl 85
  • 86. 86 04 Vim + Visual + + "cis" Display Hello there. This is an example. Just some text. "is an" "cis" Display Hello there. Just some text. "Another line.": Display Hello there. Another line. Just some text. "cis" "c" "is" "Inner Sentence" "as"(a sentence) "das". "cis" Visual Visual Visual "v" Visual "as" "as" |text-objects| *04.9* 86
  • 87. 87 04 "R" Vim replace 1 <Esc> . "text" "t" Replace Display This is text. Rinteresting.<Esc> This is interesting. 12 "interesting." 2 5 "text." "R" <Insert> Insert Replace 3 <BS> *04.10* N M N*M |operator| 1 replace 2 12 <ringken@gmail.com> . 3 Replace 87
  • 88. 88 04 List x ("dl" ) X ("dh" ) D ("d$" ) dw word db word diw word( ) daw word( ) dG dgg "c" "d" "y" yank List ~ ( 'tildeop'a Visual I Insert A Insert a 'tildeop' g~ |usr 05.txt| Vim |manual-copyright| vim:tw=78:ts=8:ft=help:norl: 88
  • 89. 89 05 Vim *usr 05.txt* Vim 7.0 . 2007 05 11 VIM --- Bram Moolenaar Vim " " " " Vim Vim plugin |05.1| vimrc |05.2| vimrc |05.3| |05.4| plugin |05.5| |05.6| |05.7| |usr 06.txt| |usr 04.txt| |usr toc.txt| *05.1* vimrc *vimrc-intro* vimrc Vim vimrc ( ) : 89
  • 90. 90 05 Vim ex command :$MYVIMRC vimrc |vimrc| ":version" Vim Unix Macintosh -- List ~/.vimrc MS-DOS MS-Windows List $HOME/_vimrc $VIM/_vimrc vimrc Vim 'incsearch' vimrc ex command set incsearch Vim Vim vim |usr 41.txt| *05.2* vimrc *vimrc example.vim* vimrc ( Vim ) Vim not-compatible ( |not-compatible|) List $VIMRUNTIME/vimrc_example.vim 90