Linux Command - text editor

Text Editor

Vim / Vi is a powerful full-screen text editor, no menu, only the command, www.vim.org official website
Here Insert Picture Description
command mode
vi / etc / services
default command mode is entered, all inputs are command
Insert mode
i. inserting a character in text cursor before
I begin inserting the text at the bank
a text insertion cursor in the letter
A is inserted at the end of the text line Bank
o insert the next line of text in the Bank
O line of text is inserted in the Bank
Esc to return to command mode
edit mode

Positioning command

Command mode
Here Insert Picture Description
Here Insert Picture Description

Delete command

Here Insert Picture Description

Cut Copy command

Here Insert Picture Description

Replace Cancel

Here Insert Picture Description

Search and replace

Here Insert Picture Description

Save and exit

: WQ
ZZ
:! WQ forced to save and exit, administrator root
: w / etc / init init file saved as

Applications

: r etc / isset isset to import the file being edited
:! command in vi execute the command
: map shortcut commands that start
: map PI ^ #
Ctrl + beginning of the line plus the p-#, ^ P by ctrl + v ctrl + p to achieve
: map ^ B 0x delete the first character

: 4,8s / ^ / # / g # adding consecutive lines
: 4,8s / ^ # // g # successive rows removed
: ab & [email protected] wshy
[email protected]
B = wshy
home directory
root / root default directory
users / home / wshy default directory
~ / .vimrc vi profile

Guess you like

Origin blog.csdn.net/weixin_41998682/article/details/89761821