command-t icon indicating copy to clipboard operation
command-t copied to clipboard

Allow to cancel scanning

Open blueyed opened this issue 11 years ago • 1 comments

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).

blueyed avatar Jul 11 '14 12:07 blueyed

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 avatar Jul 11 '14 14:07 wincent

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 on[^patches]. Feedback issue for 6.0.x is here:

  • https://github.com/wincent/command-t/issues/393

[^patches]: Patches and PRs would be welcome, but my personal efforts are going to be directed towards main.

wincent avatar Aug 26 '22 21:08 wincent