当前位置:网站首页>VIM common shortcut keys

VIM common shortcut keys

2022-06-10 18:45:00 Blue black 2020

Are the most common operations .

Browse

  • j : Down the line
  • k : Move up a line
  • h : Move one character to the left
  • l : One character to the right
  • gg : Jump to the first row
  • G : Skip to the last row
  • 0 : Move left to beginning of line
  • $ : Move right to the end of the line
  • ctrl + f : Page down
  • ctrl + b : Page up
  • ctrl + d : Turn down half the page ( d representative down
  • ctrl + u : Turn up half the page ( u representative up
  • H : Move to the top of the screen ( The page itself doesn't move )( H representative high
  • L : Move to the bottom of the screen ( The page itself doesn't move )( L representative low
  • M : Move to the middle line of the screen ( The page itself doesn't move )( M representative middle
  • zt : Move the current line to the top of the screen ( t representative top
  • zb : Move the current line to the bottom of the screen ( b representative bottom
  • z. : Move the current line to the middle of the screen
  • :<n> : Jump to the first <n> That's ok ( I need a return )

lookup

  • /xxx : Find down xxx ( I need a return )
  • ?xxx : Upward search xxx ( I need a return )
  • n : Find the next one ( The direction is determined by / perhaps ? decision )
  • N : Find the last one ( The direction is determined by / perhaps ? decision )
  • /\cxxx : lookup xxx , Case insensitive

edit

  • i : Before the current character ( Enter edit mode )
  • a : After the current character ( Enter edit mode )
  • o : Add a new row below the current row ( Enter edit mode )
  • O : Add a new row above the current row ( Enter edit mode )
  • x : Delete ( shear ) One character on the left
  • X : Delete ( shear ) One character on the right
  • dd : Delete ( shear ) Current row
  • 5dd : Start with the current line , Delete ( shear )5 That's ok
  • d$ : Delete ( shear ) The content from the current position to the end of the line
  • d0 : Delete ( shear ) The content from the current position to the beginning of the line
  • yy : Copy the current row
  • 5yy : Copy the current 5 That's ok
  • y$ : Copy the current position to the end of the line
  • y0 : Copy the current position to the beginning of the line
  • p : For copy lines , Paste... Below the current line ; For copying content , Paste after current position ( p representative paste
  • P : For copy lines , Paste... Above the current line ; For copying content , Paste before current position ( P representative paste
  • u : Cancel the operation , Can be revoked consecutively ( u representative undo

Save and exit

  • :w : preservation
  • :q : sign out ( No modification )
  • :q! : sign out ( Don't save changes )
  • :wq : Save and exit
  • :x : Save and exit

Other

  • :set nu : According to the line Numbers
  • :set nonu : No explicit line number
原网站

版权声明
本文为[Blue black 2020]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206101801475918.html