neovim-dot-app
neovim-dot-app copied to clipboard
Can not select text of output messages
Steps to reproduce
for example
:hi
A buffer with current color scheme will be shown. Try to copy something from it. Works in macvim but does not work here.
Duplicate of https://github.com/rogual/neovim-dot-app/issues/216. Leaving this open because OP of that issue was happy with a workaround & it was closed.
Copying my response here for quick reference:
Two ways of doing this:
(1) Get the change made in neovim itself, then no changes needed here.
(2) Add a separate kind of mouse selection to Neovim.app. When used, mouse commands are not sent to Neovim but processed directly in Neovim.app. Keep a record of which character cells are selected. Make the copy command behave differently when in this mode. This also requires keeping a buffer containing all the text currently on the screen, which we don't do right now.
Editing title for accuracy — the text in question is message text, not buffer text.
This is what I've been using, based on the referenced issue but gives a proper :OutputToTab
command with tab completion.
function! OutputToTab(...)
tabnew
redir @a
exec 'silent ' . join(a:000, ' ')
redir END
normal "apdd
endfunction
command! -nargs=+ -complete=command OutputToTab call OutputToTab(<f-args>)