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

A warning message appears when opening a file with the vim command under Linux

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains the "Linux under the vim command to open the file warning message", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "Linux under the vim command to open the file warning message" bar!

1. Action with warning message (abnormal shutdown)

Effect reproduction

Open any file and enter [ctrl] + z

And then check the file.

At this time, you will find that a swp file is generated in the directory.

Then open the file in vim

A warning message like this will appear.

The other kind of effect reappears.

two。 Interpretation of warning messages

You will find that there is no Delete it option here, because this option exits abnormally in the vim file.

2.1 reason for warning message

There may be someone else or program editing this file at the same time.

In the previous vim environment, vim may have been interrupted for some unknown reason

2.2 interpretation of warning messages

[o] pen Read-Only: this is an open file, read-only

(e) dit anyway: open the file you want to edit in a normal way, and the contents of the scratch disk will not be loaded. But it is easy to have the problem that two users change each other's files.

(r) ecover: load the contents of the scratch disk and use it to save the work for the storage before you save it. However, after rescuing and leaving the vim, you still need to delete the contents of the scratch disk manually.

(d) dlete it: if you are sure that the scratch disk is useless, the scratch disk will be deleted before opening the file. This option is when vim exits abnormally.

(Q) uit: press Q to leave vim

(a) bort: similar to Q, it also leaves vim.

Thank you for your reading, the above is the "Linux under the vim command to open the file warning message" content, after the study of this article, I believe you have a deeper understanding of the problem of warning message under Linux using the vim command to open the file, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Internet Technology

Wechat

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

12
Report