vim命令

  • o switch to the other end of selected text.
  • w move to next word
  • y copy
  • p paste
  • G to move to end of file,
  • gg to move to beginning
  • d delete selected text
  • dd delete one line
  • dw delete current word
  • > Indent right
  • < Indent left
  • qa quit all files
:sp filename.txt           " Horizontal split with existing file
:vsp filename.txt          " Vertical split with existing file
  • Ctrl+w w cycle through windows