Operation instruction editor vim

A three mode conversion

  1, inserted into the Command Mode Mode

    i inserted before the cursor in
    a cursor inserted after
    o line to open the next line
    I of the line is inserted at the cursor
    A is inserted in the end of a line cursor
    on the line to open line O

  2, mode enter command line mode:

  3, line mode, insert mode enter command mode esc

Second, the commonly used commands

  1, the cursor

  k  
h   l
  j  

 

 

 

  

 

  2, the cursor jumps

    H: Skip the current screen to the top
    M: Skip the current center of the screen
    L: the bottom of the current screen jump
    w jump back one word length, skip to the next word start position
    b of a word length jump forward, jump a start position of the word
    {: a skip to the beginning of the code
    }: skip next segment start code

  3, flip

    CTRL + f scroll down a
    CTRL + b upturned a
    CTRL + d Total Half-page down
    CTRL + u upturned half page

  4, rapid positioning of the cursor

    20G: rapid positioning to line 20 is
    G: quickly locate the last line
    gg: rapid positioning to the first row

  5, copy and paste

    yy Copy the line where the cursor
    4yy copy from the beginning of the line where the cursor down 4 lines

    p: Paste

  6. Cut

    dd shear cursor line
    2dd cut two lines from the beginning of the line where the cursor down
    dw delete a word
    d0 cut from the current cursor to the beginning of the line
    D from the current cursor to the end of the line cut

  7, delete

    x cursor to delete the letter
    X to delete the letter before the cursor current

  8. Find and Replace   

    / hello Search hello
    n-: the next search result
    N: search result on a
    :% s / hello / world / replaced by the full text hello world
    11,16s / hello / world /. 11 to line 16 is replaced with hello world

    r replace one character
    after character the cursor is replaced by R

  9, adjust indents

    V from the beginning of the current line selected
    v select from the beginning of the current character

    After the reduction is selected by adjusting the indent >> (right) and << (left)
    '.' Repeat

  10, Other

    u: undo operation just
    CTRL + r revoked trans

    : Q! Force Quit
    : wq to save and exit shift + zz

 

Guess you like

Origin www.cnblogs.com/haoyujun135/p/11246493.html