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

Reindex files in the background #349

Open
mahemoff opened this issue Feb 16, 2017 · 5 comments
Open

Reindex files in the background #349

mahemoff opened this issue Feb 16, 2017 · 5 comments

Comments

@mahemoff
Copy link

Is there any possibility of reindexing in the background, instead of hitting F5 and waiting?

I know this has come up for the original ctrl-p in the past, but can't find it in the issues for this fork. I think it wasn't possible due to Vim's threading model, not sure if anything has changed on that front.

@hovissimo
Copy link

Not an excellent answer to your question, but I've found that by tailoring my wildignore I can get the reindexing time down to a few hundred ms which is a lot less painful than I was used to. I did this by opening the index file in ~/.cache/ctrlp (which might be somewhere else if you've customized it), :sorting the file, and then looking for big globs of files that I don't care about and don't want to index. Then I simply added patterns that matched these files to my wildignore in my .vimrc

Hope this helps!

@prabirshrestha
Copy link

The best way would be for vim to support file change notifications. I requested the feature at https://groups.google.com/d/msg/vim_dev/oubHkRbdQW0/TZYUUQftAgAJ but no comments yet. Neovim has a discussion about it at neovim/neovim#1380. There was even a PR for neovim neovim/neovim#1791 but is now closed.

@mattn
Copy link
Member

mattn commented Apr 4, 2017

If you are okay to install binary built by go, you can do it.

https://github.com/mattn/vim-filewatcher

@mahemoff
Copy link
Author

mahemoff commented Apr 5, 2017

@mattn Thanks, have you tried it yourself with ctrlp? What would go into the vimrc?

Also can I confirm we need to copy autoload/filewatcher.vim to .vim folder? (It's not mentioned in the README)

@mattn
Copy link
Member

mattn commented Apr 5, 2017

It's experimental plugin to make sure what we can do with vim. so sorry, it may not be ready to use for this use-case.

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

4 participants