Giter VIP home page Giter VIP logo

Comments (9)

terrychou avatar terrychou commented on May 30, 2024

I think you need to empty the directory first before you can delete it via netrw.

Edited: you are right, netrw in iVim seems not able to delete directories even when they are empty.

from ivim.

lifepillar avatar lifepillar commented on May 30, 2024

I have tried call delete('.vim/some/empty/dir'), and it fails returning -1.

Other file operations, fail, too, like moving files.

from ivim.

sedm0784 avatar sedm0784 commented on May 30, 2024

I have tried call delete('.vim/some/empty/dir'), and it fails returning -1.

I think that function can only delete files, not directories. On the version of Vim on my computer, it has an extra flags argument that can be used for deleting directories, but the iVim version doesn't seem to include this flag.

from ivim.

terrychou avatar terrychou commented on May 30, 2024

@sedm0784 which version were you talking about?

from ivim.

sedm0784 avatar sedm0784 commented on May 30, 2024

@terrychou Not sure to what your question refers. The issue as reported exists in the current App Store version of iVim. I can add more details of the precise error messages if the issue is not as simple as I suggested and if you want to look into it.

The flags argument to delete() is present in Vim 7.4 with patches 1-2196. I'm not sure when it was introduced.

from ivim.

terrychou avatar terrychou commented on May 30, 2024

I see that vim of version 8 has this flag available, so I guess it may not be possible to delete a directory via a vim function before.

from ivim.

sedm0784 avatar sedm0784 commented on May 30, 2024

@terrychou Not sure if you misread my message. The new flag is present as of patch 2196 (i.e. before v8).

Regardless, since I opened this issue, you've enabled "File Sharing", and IIRC this means I should be able to delete the empty directory via iTunes, so I'm closing the issue.

from ivim.

terrychou avatar terrychou commented on May 30, 2024

@sedm0784 No, I didn't misunderstand you. I know that you said it was a patched version for 7. By what I replied, I meant that I checked the version 8 and found that it had that available. Since it was added, it means that there wasn't alternative way to fulfill the function.

from ivim.

sedm0784 avatar sedm0784 commented on May 30, 2024

For posterity's sake, I just looked it up, and it looks as though the flag parameter was added to delete() in 7.4.1107. (iVim is 7.4.900.)

from ivim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.