0

I would like to copy the following function and paste it into a shell outside vim:

enter image description here

Once I have selected the text I have tried doing "+y and it yanks the text, and allows me to copy-paste that into another vim editor, but if I try copying it into another terminal shell, it doesn't do anything. Now how I have to do it is use my mouse, remove the line numbers, and highlight those lines 37-42. What would be the proper way to yank/copy the text so I can paste it into other programs. Note that this is on a remote ubuntu server.

Note that outside of vim, I would have to use Cmd p to paste in the text (my local machine is a mac).

David542
  • 96,524
  • 132
  • 375
  • 637
  • Please note that Stack Overflow is for programming questions and not general computing issues. Please review [What topics can I ask here?](https://stackoverflow.com/help/on-topic) for more details. Question may be appropriate for [Super User](http://superuser.com) or [Unix & Linux](http://unix.stackexchange.com) but do check their help before posting. – kaylum Apr 13 '20 at 05:16
  • Does this answer your question? [How to make vim paste from (and copy to) system's clipboard?](https://stackoverflow.com/questions/11489428/how-to-make-vim-paste-from-and-copy-to-systems-clipboard) – phd Apr 13 '20 at 09:58
  • https://stackoverflow.com/search?q=%5Bvim%5D+copy+paste+terminal – phd Apr 13 '20 at 09:59
  • @phd the issue I believe is that if I then do cmd-C on the server, it will copy from my local machine instead of my remote. What's the best way to copy-paste from a remote machine? – David542 Apr 14 '20 at 04:24

0 Answers0