Open hgomersall opened 1 year ago
Hi :) I understand the opinion, but I believe there are users who do not like that behavior. By putting the following settings in init.vim, you can copy the word under the cursor with a double-click and paste it with a right-click. I think it is the vim way that users get the behavior they expect from a setting like this.
be xterm
nnoremap <2-LeftMouse> bveyve
nnoremap <RightMouse> <Esc>p
Out of interest, why would you not like the behaviour? It's standard across every bit of gui software and is the behaviour one normally expects under Linux.
That incantation doesn't seem to work. I have the following in my init.vim
which works for click-select-unclick:
vmap <LeftRelease> "*ygv
But I can't make it work for double or triple click highlighting (to get the word or the line).
This behaviour is the same in standard neovim but is not the same as vim, which does what I expect.
@hgomersall Sorry I haven't been able to reply.
It's not that I don't like the behavior, it's that I'm not comfortable defining such behavior by default. neovim can be configured to get the behavior you want, and your expected behavior can be achieved t the configuration.
If the configuration I suggested above does not work, it may be in conflict with some other mapping. How about starting Goneovim as follows?
/path/to/goneovim -u NONE --cmd 'be xterm' --cmd 'nnoremap <2-LeftMouse> bveyve' --cmd 'nnoremap <RightMouse> <Esc>p'
By the way, I have fixed a bug related to this isssue in goneovim regarding triple clicks(c47a634a22a31c294196e4205877b37e41c997af).
Thanks for the pointers. If I can configure things appropriately, I'm happy.
Ordinarily in Linux, highlighting some text copies the text into the primary buffer which can be pasted with middle click. This does not seem to happen with Goneovim.
Though it might be argued that one should use vim bindings to copy and paste, sometimes it makes sense to do it the gui way.