Home Explore Blog CI



neovim

4th chunk of `runtime/doc/usr_11.txt`
5543e70b93fdd2bad2188545cb3f5e1522156eba0a6ad8d90000000100000882
 modified is not set.
- The process is not running.

You can programmatically deal with this situation with the |FileChangedShell|
autocommand event.


UNREADABLE SWAP FILE ~

Sometimes the line

	[cannot be read] ~

will appear under the name of the swap file.  This can be good or bad,
depending on circumstances.

It is good if a previous editing session crashed without having made any
changes to the file.  Then a directory listing of the swap file will show
that it has zero bytes.  You may delete it and proceed.

It is slightly bad if you don't have read permission for the swap file.  You
may want to view the file read-only, or quit.  On multi-user systems, if you
yourself did the last changes under a different login name, a logout
followed by a login under that other name might cure the "read error".  Or
else you might want to find out who last edited (or is editing) the file and
have a talk with them.

It is very bad if it means there is a physical read error on the disk
containing the swap file.  Fortunately, this almost never happens.
You may want to view the file read-only at first (if you can), to see the
extent of the changes that were "forgotten".  If you are the one in charge of
that file, be prepared to redo your last changes.


WHAT TO DO?					*swap-exists-choices*

If dialogs are supported you will be asked to select one of six choices:

  Swap file ".main.c.swp" already exists! ~
  [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort, (D)elete it: ~

O  Open the file readonly.  Use this when you just want to view the file and
   don't need to recover it.  You might want to use this when you know someone
   else is editing the file, but you just want to look in it and not make
   changes.

E  Edit the file anyway.  Use this with caution!  If the file is being edited
   in another Vim, you might end up with two versions of the file.  Vim will
   try to warn you when this happens, but better be safe than sorry.

R  Recover the file from the swap file.  Use this if you know that the swap
   file contains changes that you want to recover.

Q  Quit.  This avoids starting to edit the file.  Use this if there is another
   Vim

Title: Handling Unreadable Swap Files and Options When a Swap File Exists
Summary
This section describes how Vim handles unreadable swap files, explaining that it could be due to a crash with no changes, permission issues, or disk errors. It suggests actions based on the cause. It then explains the options presented when a swap file exists: Open Read-Only, Edit Anyway, Recover, Quit, Abort, and Delete it, providing guidance on when to use each option.