Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The use of vim

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Vim goes in edit mode

Press I-to enter the editing mode

Press esc-to exit editing mode

Press u to undo in normal mode

Press I-cursor to enter the edit mode at the beginning of the line

Press a-cursor to enter the edit mode after the character

Press A-cursor to enter the edit mode at the end of the line

Press o-add a line below the cursor to edit the mode

Press O-add a line above the cursor to edit the mode

Vim command mode

W-write

Q-quit

Wq-write to quit

Q! -forced exit

Set nu-display line number

Set nonu--- cancel line number

/-search

N-jump down

Shift+n-Jump up

? -search

N-jump up

Shift+n-Jump Down

Replace

: 1Magic 20sCompact iptablespacing iptablesscarp replace IPTABLES in lines 1-20 with iptables

G global replacement

1the IPTABLES of the document is replaced by the iptables

1. Recording%

:% s/IPTABLES/iptables/g replaces all IPTABLES of the document with iptables

\ get out of mind

: 1 tes/ /\ / etc\ / /\ / 123\ / g replace / tes/ with / 123 /

\ can be replaced by #

Replace / tes/ with / 123 /

: nohl unhighlight

"vim" is a keyboard-operated editor, so there are many function keys in each mode.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report