holzschu / a-shell

A terminal for iOS, with multiple windows
BSD 3-Clause "New" or "Revised" License
2.75k stars 117 forks source link

`vim`: CtrlP does not work inside other app containers #349

Open rcarmo opened 2 years ago

rcarmo commented 2 years ago

After a little while fiddling with this, I've come to the conclusion that some vim plugins really don't like working inside pickFolder.

A key example is ctrlp.vim. I installed it inside ~/Documents/.vim/pack/plugins/start and set my .vimrc to:

" CtrlP
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_working_path_mode = 'wra'
" Creature comforts
let mapleader=","
set clipboard=unnamed
set mouse=a
syntax on
filetype plugin indent on
" try to set vimwiki to work with the iCloud folder (also doesn't seem to work right)
let g:vimwiki_list = [{'path': '/private/var/mobile/Library/Mobile Documents/iCloud~AsheKube~app~a
-Shell/Documents/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]

I can invoke ctrlp fine inside my home directory or any subfolder, but it fails to display a file listing of any kind when used inside pickFolder, on any app (I tried iA Writer and Working Copy).

normen commented 2 years ago

Yep, same with the built-in netrw

holzschu commented 2 years ago

Thanks for the suggestion to use netrw. I can reproduce the bug with cd ~iCloud and :Explore in Vim, which should be easy to track down.

holzschu commented 2 years ago

I think I have it tracked to a function in Vim that expands wildchars, and tries to expand the "~" in iCloud~AsheKube~app~a -Shell. netrw works well in ~group and in folders in WorkingCopy, but not in ~iCloud.

This is not necessarily the full issue, there may be other things after.

holzschu commented 2 years ago

The new version on TestFlight has a fix for that specific bug. It seems to work with CtrlP for me, but I'll wait for your feedback. https://testflight.apple.com/join/WUdKe3f4

normen commented 2 years ago

Works for me, thanks!

rcarmo commented 2 years ago

I’ve also given it a quick spin and both CtrlP and vimwiki seem to work OK (although I only tried editing one page, follow a couple of links, etc.)

Will try again over the weekend, but CtrlP seems “done” and I see no reason for the rest of vimwiki not to work either.

Many thanks!

On 12 Jan 2022, at 08:46, Normen Hansen @.***> wrote:

 Works for me, thanks!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.