neovim-dot-app icon indicating copy to clipboard operation
neovim-dot-app copied to clipboard

Can not select text of output messages

Open ngortheone opened this issue 8 years ago • 4 comments

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.

ngortheone avatar Apr 05 '16 12:04 ngortheone

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.

rogual avatar Apr 06 '16 15:04 rogual

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.

rogual avatar Apr 06 '16 15:04 rogual

Editing title for accuracy — the text in question is message text, not buffer text.

rogual avatar Jun 11 '16 18:06 rogual

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>)

mikew avatar Sep 12 '16 20:09 mikew