Monday, May 4, 2020

Re: Help: swap file created in vim each time I am editing code ?

George Dinwiddie wrote:
> Kunal,
>
> On 5/2/20 11:59 AM, Kunal Chauhan wrote:
>> Hi Team,
>>
>> I am facing issue that each time a swp file is created as I am
>> editing code.
>
> The .swp file is a normal part of vim operation. If you exit the file in
> a normal fashion, vim will delete the .swp file.
>
>>
>>
>>
>> Description is below :
>>
>> (1) Another program may be editing the same file.  If this is the case,
>>
>>      be careful not to end up with two different instances of the same
>>
>>      file when making changes.  Quit, or continue with caution.
>
> If you open another window on the same file, then both windows will be
> fighting to edit the same file with indeterminate results.
>
>>
>> (2) An edit session for this file crashed.
>>
>>      If this is the case, use ":recover" or "vim -r
>> /home/divyanshu/kunal/madLte/vRSC
>>
>> -Client/oam/lte_tr069/cwmp/common/include/map_glue.h"
>>
>>      to recover the changes (see ":help recovery").
>>
>>      If you did this already, delete the swap file
>> "/home/divyanshu/kunal/madLte/vRSC
>>
>> -Client/oam/lte_tr069/cwmp/common/include/.map_glue.h.swp"
>
> If you exit without letting vim do this cleanup, you'll get that
> warning when you reopen the file. This can happen if you shut down
> your computer with vim windows open. Exit all files before terminating
> vim and this won't happen.
If you insist on being unable to recover from various issues, you can: 
:set noswf  .  That will turn swapfiles off.

Regards,
Chip Campbell

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/9f549c70-6d02-fd94-d784-4bd9f5505b13%40drchip.org.

No comments: