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 to force the vim editor in linux to exit

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

Share

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

How do I force the vim editor in linux to exit? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.

Vim does not save exit

Vim does not save exit can first press ESC to enter the command mode; then enter: enter the bottom line command mode; finally enter Q and then enter.

More Vim commands

Enter edit mode and press o to edit

When editing is over, press ESC to jump to command mode, and then enter the exit command:

: 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

Wq saves the file and exits vi editing

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

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

Supplement

Vim is a text editor developed from vi. Code completion, compilation and error jump are particularly rich in convenient programming functions, which are widely used among programmers, and Emacs has become the favorite text editor for users of Unix-like systems.

Vim's design philosophy is a combination of commands. Users have learned a variety of text-to-text move / jump commands and other normal mode editing commands, and if they are able to combine them flexibly, they can edit text more efficiently than editors without patterns. At the same time, VIM is similar to many shortcut key settings and regular expressions to aid memory. And vim is optimized for programmers.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

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