Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
FilBot3 opened this issue May 7, 2020 · 14 comments
Open

Comments

@FilBot3
Copy link

FilBot3 commented May 7, 2020

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
Copy link
Author

FilBot3 commented May 7, 2020

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

@Arnie97
Copy link

Arnie97 commented Jun 11, 2020

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

@cl-ax
Copy link

cl-ax commented Oct 13, 2020

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
Copy link

jlxz commented Oct 15, 2020

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
Copy link
Member

mattn commented Oct 15, 2020

Could you provide minimal repro steps?

@jlxz
Copy link

jlxz commented Oct 15, 2020

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
Copy link
Member

mattn commented Oct 15, 2020

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

@jlxz
Copy link

jlxz commented Oct 15, 2020

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
Copy link
Member

mattn commented Oct 15, 2020

Hmm, could not repro.
image

mattn added a commit that referenced this issue Oct 16, 2020
@mattn mattn closed this as completed in bfa0436 Oct 16, 2020
@mattn
Copy link
Member

mattn commented Oct 16, 2020

I figure out the bug. Thank you.

@jlxz
Copy link

jlxz commented Oct 30, 2020

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
Copy link
Member

mattn commented Oct 30, 2020

I will look into it layer.

@mattn mattn reopened this Oct 30, 2020
@mattn
Copy link
Member

mattn commented Oct 30, 2020

image

image

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

@jlxz
Copy link

jlxz commented Nov 1, 2020

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/comappleCloudDocs/MyNotes/

I think it has to do something with the parsing of the combination of comappleCloudDocs 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/comapple
CloudDocs/ it works
If I enter the command: CtrlP /Downloads/Library/comapple~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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants