Dominique wrote:
> 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. Hmm, the patch also includes code for unnamedplus, who would it not work? -- Google is kind of like Dr. Who's Tardis; it's weirder on the inside than on the outside... /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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/202105061537.146FbQFB1106227%40masaka.moolenaar.net.
