41

I have files

server.log
.server.log.swo
.server.log.swp

how to open swo and swp?

IAdapter
  • 62,595
  • 73
  • 179
  • 242

2 Answers2

87

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.

Devon_C_Miller
  • 16,248
  • 3
  • 45
  • 71
3

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.