vim编辑器命令
vim
or vi
is very powerful text editor used in Linux systems. As they provide a lot of features and used from command line they have a lot of commands and shortcuts. In this page we will list these commands as a cheat-sheet. We will look most used command and shortcuts in this tutorial which makes this guide as beginner guide.
vim
或vi
是Linux系统中使用的非常强大的文本编辑器。 由于它们提供了许多功能并从命令行使用,因此它们具有许多命令和快捷方式。 在此页面中,我们将这些命令作为备忘单列出。 在本教程中,我们将查找最常用的命令和快捷方式,这将使本指南成为初学者指南。
编辑 (Edit)
编辑当前文件(Edit Current File)
:edit
编辑特定文件 (Edit Specific File)
:edit text.txt
插入 (Insert)
在光标后附加文本(Append Text After Cursor)
:a
在行尾追加测试 (Append Test At The End Of Line)
:A
在光标之前插入文本 (Insert Text Before Cursor)
:i
在行中第一个非空白之前插入文本 (Insert Text Before First Non-Blank In The Line)
:I
在下面开始新行并插入文本 (Begin New Line Below And Insert Text)
:o
在上方开始新行并插入文本 (Begin New Line Above And Insert Text)
:O
删除 (Delete)
删除光标之前的字符(Delete Character Before Cursor)
:x
光标后删除字符 (Delete Character After Cursor)
:X
删除当前行 (Delete Current Line)
:dd
从当前行删除多行 (Delete Multiple Lines From Current Line)
:d5d
救 (Save)
救(Save)
:w
另存为 (Save As)
:w deneme.txt
出口 (Exit)
出口(Exit)
:x
保存并退出 (Save and Exit)
:wq
退出而不保存更改 (Exit Without Saving Changes)
:q!
了解更多如何删除Vim中的单行和多行?
翻译自: https://www.poftut.com/vim-editor-commands-cheat-sheet/
vim编辑器命令