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

Caching is not happening command-t #383

Closed
dcDeba opened this issue Oct 4, 2021 · 8 comments
Closed

Caching is not happening command-t #383

dcDeba opened this issue Oct 4, 2021 · 8 comments

Comments

@dcDeba
Copy link

dcDeba commented Oct 4, 2021

Every time I try to open command-t on a file, it starts searching for all the files making the vim unusable. How to cache the result and use the same cache in multiple files.?

@wincent
Copy link
Owner

wincent commented Oct 4, 2021

Do you have 'autochdir' set, by any chance? (See :h 'autochdir'). That setting causes Vim to change directory every time you open a file, which causes Command-T to have to re-scan from the new "root" directory.

See also :h g:CommandTMaxCachedDirectories, which lets you choose how many directories get cached.

@dcDeba
Copy link
Author

dcDeba commented Oct 4, 2021

I checked if autochdir is set or not using the below command:
command--> :verbose set autochdir?
Output--> noautochdir

I have set g:CommandTMaxCachedDirectories to the following in .vimrc

let g:CommandTMaxCachedDirectories=0

@wincent
Copy link
Owner

wincent commented Oct 4, 2021

Must be something else going on then. This is with the standard :CommandT finder, right?

Can you confirm that :pwd is stable and not changing?

There might be something unknown to me in your local environment that is causing Command-T to drop its cache; there isn't anything internal to the plug-in itself that would do that, other than the things I just said.

@dcDeba
Copy link
Author

dcDeba commented Oct 4, 2021

Yes, with standard :CommandT finder.

I have opened the same file twice and checked the output of :pwd and its same.

Is there any way to specify the cache path?

Also, what is the name of the cache file and in which directory is it created.

@wincent
Copy link
Owner

wincent commented Oct 4, 2021

It's not a file; it's an in-memory cache — as in, if you quit Vim, the cache is gone.

@dcDeba
Copy link
Author

dcDeba commented Oct 4, 2021

Okay!
Is there any way I can debug the issue?

@wincent
Copy link
Owner

wincent commented Oct 4, 2021

You could try disabling all other plugins and starting with an empty .vimrc; like I said above, there's nothing internal to Command-T that would cause it to rescan a cached directory.

@wincent
Copy link
Owner

wincent commented Aug 26, 2022

Given the big rewrite for v6.0.x, I'm closing all older issues as there is unlikely to be anything significant happening on the 5-x-devel branch from here on1. Feedback issue for 6.0.x is here:

Footnotes

  1. Patches and PRs would be welcome, but my personal efforts are going to be directed towards main.

@wincent wincent closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2022
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

2 participants