Tuesday, May 9, 2017

turn off/on clipboard before/after global command?

I am finding that despite the patch committed in 7.4.396 (see thread https://groups.google.com/forum/#!topic/vim_dev/PzKxIYNtgTo ), if clipboard=unnamed, global commands such as g/foo/d are extremely slow (100x slowdown).

I am seeing this behavior in 7.4.396 as well as the latest 8.0 patch.

I see this behavior only when running vim on Linux but using a Windows desktop, but I have tried multiple X servers (Cygwin/X, Xming, MobaXTerm) and multiple terminal emulators (Putty, MobaXTerm, a Cygwin terminal) and see the same result in all of them. When I ssh to the same Linux machine from a MacOS machine, I don't see the problem.

As I've been unable to solve this, I'm looking for a workaround. Is it possible to do a remap such that

:g/foo/d

becomes

:set clipboard=exclude:.*
:g/foo/d
:set clipboard=unnamed


so as to disable using the system clipboard for the duration of the global command?

Thanks,

Daniel

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: