Thu Dec 3 07:39:45 CST 2020

Vim first

vim use muscle not memory

There are 3 modes

  • ( esc ) Normal mode : move
  • ( i ) Insert mode : type only
  • ( v ) Visual mode : select

Command

esc
  :
    w - save
    q - quit
      q! - quit force

Cursor movement

In moving area

esc
  h j k l
  < ^ v > 

      ^
      j
  < h   l>
      k
      v

Then

  • behind
  a
  • end of line
  A
  • insert at cursor
  i
  • replace
  r
  • delete
  d space
  • delete line
  dd
  • copy line
  yy
  • paste
  p
  • undo
  u
  • jump top
  gg

bottom

  G

Visual Mode

  • position
esc
   v  
  • line
esc
   V  
           ^
           j
      < h     l>
           k
           v