Skip to content

erig0/nc2xclip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nc2xclip

Goal

The goal of nc2xclip is to provide a simple way to copy text from a remote (SSH) vim session to the local/host machine without relying on X forwarding.

How it works

The client data is yanked from VIM and shoved through netcat to the server/receiver.

The server waits for incoming data with netcat. That data is piped to xclip and made available in the primary, secondary and clipboard.

Install

Server (Receiver/local)

$ cp nc2xclip ~/bin
$ export PATH="~/bin:$PATH"

Client (Sender/remote)

$ cp nc2xclip.vim ~/.vim/plugin/
$ cp get_visual_selection.vim ~/.vim/plugin/

Usage

Start server

$ nc2xclip &

Client

SSH to the remote with

$ ssh -R 12345:localhost:12345 <remote_addr>

Then you in VIM you can yank text with with <leader>y and it will be available on the local machine.

About

Remote copy for VIM. Shoves text through netcat and catches it with xclip.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors