Comments (16)
This has been released in version 1.36
from ivim.
I have added related code into the branch: https://github.com/terrychou/iVim/tree/openurl
You can have a look at it by installing it via Xcode.
It now supports opening a folder, and within it, you can add files or subfolders, editing or deleting files, renaming files or folders. (I add the filesystem support as much as I can)
Please test it and any suggestions are welcome.
from ivim.
Yes, I had it on for a while: you need to set allowsMultipleSelection
to true
.
from ivim.
Thanks @palmin
So in iOS before 11, what I could do is to add "public.directory" into the document types of the document picker. The rest depends on the other apps to implement file provider to support it.
from ivim.
No, we have been talking about how to enable :idoc
to open folders, which is the first step to make the "setting working directory" possible. Some more code needs to be added for it to work properly.
from ivim.
This "folder opening" feature is somehow like the new "packaged document editing". The difference is that the system doesn't treat the former as an editable item therefore you cannot open it. Maybe you can try and rename your target folder to a recognizable package extension (packaged documents are actually folders, except that they have specific extensions), to see whether that would work or not. But be warned, in this case, updating one file will update the whole folder between the two apps. So there might be efficiency problem with huge folders.
from ivim.
The main problem here, is there seems no way to choose a folder in the document picker invoked by :idoc
. (You tap a folder, it enters it instead of picking it.) I have tried "public.directory" or "public.folder" but neither works.
Does anyone know the solution to this?
from ivim.
Thanks, @holzschu , this is exactly what I needed.
But it seems a new addition to iOS 11, is there any way to have this function in iOS 9 or 10?
from ivim.
I have no ways to test it, but from what I understand from a quick internet search, it's possible that the functionality was present by default on iOS 9 and 10, and had to be explicitly enabled on iOS 11.
@palmin had folder selection working in WorkingCopyApp before iOS 11: https://www.youtube.com/watch?v=TA8atK2sdxc He may be able to give help here.
from ivim.
For iOS 8 through iOS 10 the document picker handles UI for selecting documents and it is up to each specific implementation to support directories. I know of Working Copy and Git2Go that support picking directories.
The document picker is passed the UTI's that the app wants to pick files conforming to and Working Copy would allow picking directories if any of the types conformed to public.directory. I presume Git2Go does something similar.
Note that the document picker is no longer used on iOS 11 but a file provider is needed for both iOS 10 and earlier and for iOS 11, but there is a API error (confirmed by Apple engineers) such that it isn't possible to make a file provider that works for both iOS 11 and iOS 10 and earlier. Apps can thus either support the Files app in a legacy mode and retain file provider compatibility with iOS 10 or they can fully support the Files app and drop file provider support for iOS 10.
from ivim.
I'm struggling to follow the conversation a bit ... does this mean that setting the folder as the working directory for iVim is dependent on Working Copy changing something in their setup to allow idoc to open the folder? I'm on iOS 11.2.6
from ivim.
Thanks, I'll take a look this weekend
from ivim.
Hi @terrychou,
It works for me. Great job.
Files and directories created by shell commands do not appear in the other app until they are edited by and saved by iVim. Is there anything I can change for this?
from ivim.
Thanks for feedback, @holzschu .
Since all the filesystem events in this part are triggered through vim, only operations in the vim way (e.g. vim functions, vim commands, etc.) would work.
If you want to make this work for the shell part, you need to make the all sync code response to the events triggered by the shell commands. Check out file gui_ios.m for functions such as mch_ios_post_file_remove(...). (I wanted to add deeper filesystem events handling, but unfortunately iOS doesn't have the FSEvents available.)
from ivim.
made the filesystem operations much safer and updated the code.
Please test it. (testing it in the iPad split view mode would be great). This code still doesn't guarantee bug-free, therefore please make backups before testing.
from ivim.
updated the related code more and made it even more safer.
Are you having any problems so far?
This version will be put onto App Store if no obvious problems are found.
from ivim.
Related Issues (20)
- Could access to iCloud Drive be built into iVim?
- Text search utilities that work in iVim HOT 2
- iVim’s font when downloaded from the App Store? HOT 1
- iPlug source code
- Additions to spell file not sticking HOT 1
- How to copy/paste from/to the system clipboard for other applications HOT 5
- Window height is incorrect after iPadOS 15.7 update HOT 1
- set guicursor has strange effect HOT 2
- Cmd-Period no longer interpreted as <Esc> in iPadOS 16 HOT 6
- Themes possible with :iplug? HOT 2
- Markdown Preview
- Hard to type slash and question mark, key to close to screen edge HOT 2
- Screen stretch when repositioning cursor
- Copy and paste into iVim HOT 1
- Reading directories in the cloud HOT 2
- Consider a NeoVIm iOS port?
- Update python3 version?
- :echo system('uniq', ["a", "a", "b"]) —> crash HOT 2
- :ipreview markdown themes?
- findfile(‘filename’, ‘**’) does not work in iCloud directories HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ivim.