> Setting 'clipboard' to the value 'unnamed' and using commands which affect
> the clipboard results in vim hanging and windows frozen for over 1-2
> minutes; once vim returns, the operating system feels laggy and slugish.
>
> Example:
>
> 1. create a buffer with 10,000 lines of the word 'test':
>
> test
> test
> test
> ...
> test
>
> 2. set clipboard to 'unnamed':
>
> :set clipboard=unnamed
>
> 3. apply the following command:
>
> :g:test:d
>
> This command will go to every line with 'test' and apply the delete-line
> command. Vim should now be suspended for a couple minutes while it carries
> out this command. On my machine, my entire operating system freezes.
>
> However, when the 'clipboard' option is empty (set clipboard= ), vim applies
> the command instantly as expected.
>
> I suspect that vim is trying to access the system clipboard 10,0000 times --
> once for every delete command.
>
> Can anyone else reproduce this issue?
>
> Windows 7 x64; Vim 7.3; Core i7-920; 12gig ram;
I don't have a system at hand to reproduce this, but I would not be
surprised if the clipboard on Windows is slow.
Since all actions to put something on the clipboard but the last one
will be overwritten this could be improved. It's not so easy to make a
generic solution though, instead of "d" for delete it could be any
command. It would involve storing the text to be put on the clipboard
internally and moving it to the clipboard at the end of the ":g"
command.
--
hundred-and-one symptoms of being an internet addict:
188. You purchase a laptop so you can surf while sitting on the can.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
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
No comments:
Post a Comment