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

Allow to cancel scanning #93

Closed
blueyed opened this issue Jul 11, 2014 · 2 comments
Closed

Allow to cancel scanning #93

blueyed opened this issue Jul 11, 2014 · 2 comments
Labels

Comments

@blueyed
Copy link
Contributor

blueyed commented Jul 11, 2014

It would be helpful, if you could abort the scanner (using Ctrl-C).

It appears the (GNU) find-based scanner behaves better than the (default) ruby one.
Is this the case?

Is this a limitation from Vim?
Would it help to make use of vimproc if it is available?

The usual case where I need to do this when I've accidentally invoked Command-T on a wrong (and huge) directory.

I've noticed in this regard, that there might be Vim errors afterwards (like missing :endif - just from the top of my head, not sure about this), but these are normally fixed when invoking :CommandT again.

I have recently switched back from the (GNU) find-based scanner to the ruby scanner, because the find-based scanner does not exclude/handle g:CommandTWildIgnore during scanning (and I use it to exclude (very) slow directories, like sshfs mounts).

@wincent
Copy link
Owner

wincent commented Jul 11, 2014

I'm not sure if either of them behave particularly well Ctrl-C but I agree it would be nice if they would.

I suspect Vim itself is catching the interrupt and not passing it on. Usually in Ruby you get an Interrupt exception if somebody hits Ctrl-C, but that's not happening here. On the other hand, if an external 'grepprg' is taking a long time and you hit Ctrl-C, Vim does abort it.

Command-T itself does add a mapping for <C-c> (unless you override it) in order to close the match listing, but that isn't what's at play here because I still observe Vim swallowing the interrupt even I suppress the set-up of that mapping. Perhaps some other default mapping is at issue (:h CTRL-C) and would need to be somehow unset in order for this to come through.

I don't know much about vimproc but it seems likely that something "out of band" like that would be the only way to make this happen.

@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
Projects
None yet
Development

No branches or pull requests

2 participants