(C) ----- use the Vim editor linux learning

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/q303705455/article/details/95027267

Vim editor (three modes)

  • Command Mode
  • Edit mode
  • Mode of operation

Three modes of conversion:

  • Enter vim, enter vim editor
  • When entering the vi editor, default operating mode
  • Want to use the command, enter ":", enter the command mode
  • To enter the edit mode in the command mode, or the need to press a key i
  • To enter the command mode in Edit mode, press the Esc key

In command mode:
: Number The the SET / NU display line numbers
: set nonumber canceled line number
: q does not save the address, quit
: q! Without saving, force-quit
: wq save and quit
: w! Force Save
: w save without exiting
: x will automatically determine whether you want to save, then exit

Operation mode:
YY Copy the current row
nyy copied to the cursor position n rows
dd delete
u revocation
ctrl + F at a bar
ctrl + lower of half-page?
Hop on a B ctrl +
ctrl + u on half a page jump
h to the left , a cursor left
l right
j keys down
the up key k

ps: 1.Vim need to pay attention to the interaction partition file
2.nano editor and editor like vim usage, nano using a simpler, vim powerful

Guess you like

Origin blog.csdn.net/q303705455/article/details/95027267