Re:Vim 8.1
by emacsvimlover on Friday May 18, 2018 @12:31PM
(#17102748)
After running :terminal, is there a way to yank text from my editor window and paste it into the terminal? Likewise, is there a way to copy text from the output of a command (run in the terminal) and paste it into the other window?
[ Parent
| on HN ]
Re:Vim 8.1
by Elidrake24 on Friday May 18, 2018 @12:37PM
(#17102802)
For Mac OS, I'd suggest sharing the default storage buffer with the clipboard: http://vim.wikia.com/wiki/Mac_OS_X_clipboard_sharing
probably a good idea, but I've always gotten by with selecting text, then just `:!pbcopy && pbpaste` when I need to get something TO the system clipboard.
In a terminal window, you can type CTRL-W N (with upper case N) to switch the terminal to normal mode, where you can then move in the buffer and copy things in the terminal buffer using regular vim commands. You can go back to typing commands in the terminal by typing i or a (as when going in insert mode). You can paste in the terminal using CTRL-W " followed by the register name.
See :help terminal
Re:Vim 8.1
by emacsvimlover on Friday May 18, 2018 @04:23PM
(#17104671)
Thanks all!
You can go to terminal-normal mode using ctrl-w N, and then you can select and yank as usual. To paste, you can use ctrl-w " <register>. Also see :help terminal.