terrychou / iVim

A vim port to iOS.
598 stars 35 forks source link

iVim deletes all inactive files in opened iCloud folder #111

Open normen opened 4 years ago

normen commented 4 years ago

Well..

Sadly I can't (and don't want to) really reconstruct what exactly has triggered this but the folder I used to test iVim with (the iCloud folder of TextEdit) is suddenly empty, only the two files I opened in iVim remain in the folder.

I opened that folder various times using the :idoc dir command and edited a few files. I definitely didn't call :!rm * or anything like that and while I did play with a-Shell at the same time I think I can pin it down to iVim as I opened the remaining files there.

It seems like somehow the sync-back failed and iCloud got the local copy of iVim or something?

Cheers, Normen

normen commented 4 years ago

Come to think of it, I did switch the document storage location in a-Shell before this happened.. I'll post an issue there as well and link this one.

doitian commented 4 years ago

I have met the same issue.

iOS 13.5.1 Model Name iPad Pro (12.9-inch) (4th generation)

I open the iCloud Desktop in ivm via idoc dir and suddenly all the folders and files in Desktop are gone.

Also I observe that some times the editing file is automatically restored and the last inserted words are dropped.

terrychou commented 4 years ago

The design of idoc dir will make a copy of the original folder and sync files according to some events. Which seems not getting along well with the folders in iCloud.

A new way to open external directories in iVim has been added and is under testing.

Would you help and give it a try to see whether this new way works better? If so, please offer me an email address so I can send you a TestFlight invitation.

normen commented 4 years ago

Would you help and give it a try to see whether this new way works better? If so, please offer me an email address so I can send you a TestFlight invitation.

You can use the email in my profile, I guess posting it here makes it more accessible for scraping..

terrychou commented 4 years ago

@normen done, the new command is :iexdir. Please see :h :iexdir first.