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

VIM common commands

2022-06-22 03:29:00 Fenghua Langlang

VIM

I have been working for five years , Although I have been using , But it is used superficially , Search for keywords 、 Jump to home page 、 Closing page 、 Insert etc. , There are too many other commands that don't seem to be used , But now we use another part , Let's sum it up , Leave a library to find .

One 、 Save the file
:q sign out
:wq Save and exit
:q! Do not save and exit
:w preservation
:w! Forcibly preserve
:wq! Force save and exit |
Two 、 Jump

vim Jump to the first and last line in the

last line node

:0 or :1 Skip to the first line of the file

:$ Skip to the last line of the file

Command mode

gg Jump to the first row
#G: Jump to # That's ok
shift+g Skip to the last line of the file
+#: Downward # That's ok

The delete command : d
d Command is used in combination with jump command #dw, #de, #db
dd: Delete the current cursor line
#dd: Delete the line including the current cursor # That's ok ;

原网站

版权声明
本文为[Fenghua Langlang]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206220312375846.html