I have files
server.log .server.log.swo .server.log.swp
how to open swo and swp?
The . swp is created when a file is opened in the editor. The . swo is created if the file is edited and the . swp already exists.
swp is a swap file, containing the unsaved changes. While editing a file, you can see which swap file is being used by entering :sw . The location of this file is set with directory option. The default value is .,~/tmp,/var/tmp,/tmp .
Use the swap -d command to remove swap space. The swap file name is removed from the list so that it is no longer available for swapping. The file itself is not deleted. Edit the /etc/vfstab file and delete the entry for the swap file.
The reason this message comes up is that every time you edit a file, vim creates something called a "swapfile". A swapfile is a bit like an autosave file -- it keeps track of the current state of your document -- but it also stores additional information about your editing session (such as your undo/redo history).
Those are temporary files created by the vim editor. The .swp is created when a file is opened in the editor. The .swo is created if the file is edited and the .swp already exists. Edit it a third time and you get a .swn, and so on. When vim is closed, those files should go away. If vim crashes or is killed, they may be left behind. They are safe to ignore.
the files remain even after vim is closed we need to use vim in recover mode, save and then move the files to a different name. then delete the .sw* files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With