How to copy code from vim editor to windows applications?

naseeam
naseeam used Ask the Experts™
on
I have vim version 8.0 editor.  I want to copy code snippets from vim editor and paste them in windows applications.
I don't have clipboard and xterm_clipboard support in my vim.

How do I copy code (including line numbers) from vim editor to windows applications?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Scott SilvaNetwork Administrator

Commented:
Can you ssh to the linux machine from the windows machine and copy that way?

Author

Commented:
>> Can you ssh to the linux machine from the windows machine and copy that way?
From my windows computer, I ssh into remote virtual Linux box.  But how to use this setup to copy from vim to windows applications?
My ssh is WinSCP.  I can open Linux files in WinSCP editor and copy to system clipboard.  Or I can drag Linux files to windows file explorer.

But is it possible to copy code snippets in vim editor to windows applications?
Fractional CTO
Distinguished Expert 2018
Commented:
Simple way.

1) Bring up vim in one window.

2) Bring your Windows app up in another window.

3) Cut + Paste between the windows.

Note: Some VM systems may require some mucking around with settings for this to work.
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

Scott SilvaNetwork Administrator

Commented:
Install VIm on your windows machine and set it as your editor in WinSCP

Author

Commented:
Thank you!   It works!  I didn't have to change any settings.  I didn't find this simple solution on the internet.
nociSoftware Engineer
Distinguished Expert 2018

Commented:
gvim is the gnome windowed variant of vim.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial