Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 1894

Vim stores changes made to a buffer on disk to a swap file, so that any unsaved changes can be recovered in case of a crash.

26 votes

How do you view the diff of a swap file without quitting Vim?

Here is the vim commands you need to view the diff, resolve any differences, and save the file. All done without quitting vim or using plugins. From the command line, open the file, there will be a co …
Trevor Boyd Smith's user avatar
22 votes
5 answers
13k views

How do you view the diff of a swap file without quitting Vim?

I have a way to handle swap files. And it works but it takes a while. Here goes: First I try to find the original vim session -- track down if the PID is still alive -- and if the PID is still al …
Trevor Boyd Smith's user avatar