neovide icon indicating copy to clipboard operation
neovide copied to clipboard

Allow to select command output with the mouse

Open mambusskruj opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. GitHub workflow example: I'm always frustrated when I push changes to git remote and can't select (or even click) the URL in the response that proposes creating a new PR.

Describe the solution you'd like Make command output selectable and clickable.

Out of the issue scope, but how do you feel about adding the possibility of making all text selectable with vim bindings (similar to the tmux copy mode)?

mambusskruj avatar Feb 19 '24 11:02 mambusskruj

It's not as simple as it sounds, we don't have the full text representation, we just have a set of characters in individual cells, with no information about if the line is word wrapped or has a hard line-break for example. Furthermore, we need to ensure that any key bindings for this does not conflict with Neovim ones, perhaps by letting the user map them from there.

The selection additionally needs to follow window borders, perhaps even scroll the output as you select past the visible text.

That all could be much better dealt with inside Neovim itself, so perhaps it should be a Neovim feature request?

For the URL there might be an alternative solution: https://twitter.com/Neovim/status/1759933815412121698

For now, a workaround is :let @* = execute('messages'), which will yank all messages, which you can then paste into a buffer. Or :put =execute('messages') to put them directly to the current buffer.

fredizzimo avatar Feb 20 '24 19:02 fredizzimo