Nick Jensen wrote: > The 2021-05-06 00:45, Dominique Pellé wrote: > >It e.g. takes ~7 seconds with "only" 5000 lines using: > > > >$ yes | nl | head -5000 | vim - -c 'g/./d' > > On my system it takes ~7.5 seconds with 150000 lines. But if I delete to > the black hole register it works in just under a second: > > $ time yes | nl | head -150000 | vim - -c ':g/./d_' -c 'q!' > > Regards, > Nick
Thanks, that's is a good solution! James McCoy wrote: > > I then realized that the Vim command :g/./d copies > > each line that it deletes to the clipboard. And somehow > > the clipman applet made copying to the clipboard slower. > > This was supposed to be addressed by 7.4.396, which > defers updating the selection ownership until :g is done running. Link to that patch: https://github.com/vim/vim/commit/6b1ee34aa0236b50f675f3bbcd9bf0b7a3384f7f updated for version 7.4.396 Problem: When 'clipboard' is "unnamed", :g/pat/d is very slow. (Praful) Solution: Only set the clipboard after the last delete. (Christian Brabandt) Ah, it's fast when clipboard=unnamed. However, it's slow with clipboard=unnamed,unnamedplus which I have in my ~/.vimrc. Regards Dominique -- -- You received this message from the "vim_dev" 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_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAON-T_j1JCcQZYoCM5egu3NNS5HBnNSi52HSY3F7zMHPRUjEcw%40mail.gmail.com.
