Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlighting does not put text in the primary buffer #443

Open
hgomersall opened this issue Mar 9, 2023 · 4 comments
Open

Highlighting does not put text in the primary buffer #443

hgomersall opened this issue Mar 9, 2023 · 4 comments

Comments

@hgomersall
Copy link

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.

@akiyosi
Copy link
Owner

akiyosi commented Mar 14, 2023

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

@hgomersall
Copy link
Author

hgomersall commented Mar 14, 2023

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.

@akiyosi
Copy link
Owner

akiyosi commented Apr 1, 2023

@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(c47a634).

@hgomersall
Copy link
Author

Thanks for the pointers. If I can configure things appropriately, I'm happy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants