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

How does linux exit editing mode

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Background

Editors in text mode include vi and vim (an enhanced version of vi). Vi and vim are our most commonly used editors in Linux. Vi or vim is the most basic text editing tool of Linux. Although v or vim is not as simple as the mouse click operation of the graphical interface editor, the vi editor can never be compared with the graphical interface editor in the system management and server management character interface. (note: vi is the most classic text editor in the unix/linux operating system, which can only edit characters, not fonts and paragraphs; it can either create or edit files; it has no menu, only commands, and many commands. Although vi operates very differently from other commonly used text editors such as gedit, it is still used frequently because it runs in a character interface and can be used in all unix/linux environments. )

There are three modes of vim, note: there are many different names for these three modes, which I call it here according to Brother Bird's linux book.

General instruction mode, edit mode, instruction line command mode

The 1.vim file name enters the general mode

two。 Press I to enter edit mode; (or I, o, O, a, A, r, R)

3. When editing is over, press ESC to jump to normal mode

4. Press: enter instruction line command mode

The command after entering instruction line mode is as follows

1. Save without exiting:

: W save the file without exiting vi editing

: w! Force save without exiting vi editing

W file saves the changes to file and does not exit vi editing

two。 Save and exit:

Wq saves the file and exits vi editing

: wq! Force to save the file and exit vi editing

3. Do not save and exit:

: Q do not save the file and exit vi editing

: q! Do not save the file and force to exit vi editing

: e! Discard all changes and edit since the last time the file was saved

These are the details of the command for linux to exit editing mode. Please follow other related articles for more information.

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

Servers

Wechat

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

12
Report