ctrlpvim / ctrlp.vim

Active fork of kien/ctrlp.vim—Fuzzy file, buffer, mru, tag, etc finder.
ctrlpvim.github.com/ctrlp.vim
Other
5.57k stars 259 forks source link

CtrlP not showing files in current directory but I can see them with netrw #540

Open FilBot3 opened 4 years ago

FilBot3 commented 4 years ago

The thing that is getting me about this is that I just used this plugin earlier and now for some reason I cannot get CtrlP to show any files that are available in my current working directory. When I start up :CtrlP . I get == NO ENTRIES == but then I can cancel out of that hit up :Explore and see all the files in the main directory.

I've tried hitting/mashing the F5 button, and then also doing CtrlPClearCache or CtrlPClearAllCaches and no change.

The only thing that may have changed on my system was that I installed Build tools for VS 2019 so I could use rust.vim.

I'm not sure how to troubleshoot this issue more, so I may need guidance.

FilBot3 commented 4 years ago

When I run :CtrlPMixed I see ALL of my files in my User's home directory instead of just the current working directory.

Arnie97 commented 4 years ago

Did you enable the ctrlp-autoignore-extension or g:ctrlp_user_command?

cl-ax commented 3 years ago

I have the same issue. I used to use CtrlP without any issue but I recently upgraded my plugins (I don't know which version I had before, but it was not older than 6 or 9 months max) and now it won't find files in the current directory either. If I use :CtrlPMixed then it finds them again. I didn't change any of the options or config since before updating.

jlxz commented 3 years ago

Same issue here. I think it has to do with special characters in folder names. I'm only having this issue with "Mobile Documents" folder for macOS iCloud Drive. All the folders in this one uses ~ as separator and CtrlP fails when trying to recursively open this folders. Working fine with CtrlPMixed as said before. Maybe different path treatment in CtrlP and CtrlPMixed?

mattn commented 3 years ago

Could you provide minimal repro steps?

jlxz commented 3 years ago

If you are on macOS, try the next commands:

:CtrlP /Users/<username>/Library/Mobile\ Documents/com~apple~CloudDocs/
:CtrlP /Users/<username>/Library/Mobile\ Documents/
:CtrlP /Users/<username>/Library/ 

The first two will fail based on my ~ separator theory. The last one will work and show a list of files.

If you are on other Unix/Linux system try to create a folder with ~ in the name, something like my~testing~folder and put some files in there, and try to CtrlP that path.

Hope it helps.

mattn commented 3 years ago

On my Windows 10, I can't reproduce this. Are you using ctrlp_user_command?

jlxz commented 3 years ago

Hi,

I did new findings. The issue is not with ~ as separator, but with spaces. The problem is in Mobile\ Documents. I created a folder with ~ and with spaces and the one with spaces failed.

No, I'm not using ctrlp_user_command. Neither ctrlp-autoignore-extension.

And my Vim version (MacVim) is: VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 21 2020 04:03:24) macOS version Parches incluidos: 1-1719

mattn commented 3 years ago

Hmm, could not repro. image

mattn commented 3 years ago

I figure out the bug. Thank you.

jlxz commented 3 years ago

Hi, I'm afraid the fix didn't work, at least for me. CtrlP can't list the files when in the path name to those files are spaces. It's spaces the issue, I tested several times. Thanks.

mattn commented 3 years ago

I will look into it layer.

mattn commented 3 years ago

image

image

This is working well for me. Could you please figure out what is wrong?

jlxz commented 3 years ago

Hi, I did more testing and I think I have the point where CtrlP fails. Let me explain. I work on macOS. My notes folder is on iCloud Drive. The real path to the iCloud Drive folder on macOS is a bit hidden into the system folder using non-conventional symbols for a path, like this: /Users//Mobile\ Documents/com~apple~CloudDocs/MyNotes/

I think it has to do something with the parsing of the combination of com~apple~CloudDocs and Mobile\ Documents.

I replicate the path above in my Downloads folder: Captura de pantalla 2020-11-01 a las 17 23 38

If I enter the command: CtrlP ~/Downloads/Library/ it works If I enter the command: CtrlP ~/Downloads/Library/Mobile\ Documents/ it doesn't work

I repeat the test swapping the two conflictive folders in the path, like this: Captura de pantalla 2020-11-01 a las 17 26 57

If I enter the command: CtrlP ~/Downloads/Library/ it works If I enter the command: CtrlP ~/Downloads/Library/com~apple~CloudDocs/ it works If I enter the command: CtrlP ~/Downloads/Library/com~apple~CloudDocs/Mobile\ Documents/ it doesn't work

I suspect it's something with how CtrlP parses the path, and the combination of ~ and spaces maybe it's breaking something.

Hope it helps.

Thanks.