Thursday, December 26, 2024

Re: Pasting large text in vim

On 2024-12-26, Enan Ajmain wrote:
> On Thu, 26 Dec 2024 10:28:54 -0800
> Gary Johnson wrote:
> > On 2024-12-26, Enan Ajmain wrote:
> > > On Mon, 21 Oct 2024 14:23:47 -0400
> > > Ven Tadipatri wrote:
> > > > [...]
> > > > Now, there is some fine print that I should let people know. Your vim
> > > > compiler needs to be built with a "+clipboard" option.
> > >
> > > This is the sore point. For people who use Vim over ssh, this is not an
> > > option (ssh -X is crappy at least in my experience).
> >
> > This has not been my experience at all. I routinely copy and paste
> > over ssh with never a problem.
> >
> > Regards,
> > Gary
> >
>
> Do you use the -X switch with ssh? If not, how are you copy-pasting?
>ForwardX11 And if yes, are you using the "* or "+ register?

I don't use any ssh options on the command line, just the host name.

I have these set in ~/.ssh/config for every host I ssh to:

ForwardX11 = yes
ForwardX11Trusted = yes

It seems that I shouldn't need both, but I've had issues in various
work and home environments that went away when I used one or the
other and both have worked, too.

'clipboard' is set to this:

clipboard=unnamed,autoselect,exclude:cons\|linux

so I generally use the unnamed register, but when I use a name,
I use "* rather than "". That is, I yank to the default, unnamed
register and put from it as well. So, to copy an entire file, it's

ggyG

in the source buffer and

p

in the destination buffer.

I did notice some slowness today when pasting a 41,310-line file
over ssh as an experiment. Sometimes it took 12 seconds; other
times it took only 1 second. I seldom copy-and-paste that much
text, so I've not noticed any slowness before. If you do that
regularly with that kind of performance, I can see how that would be
annoying.

Regards,
Gary

--
--
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.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/20241226203310.GB1820%40phoenix.

No comments: