Skip to content

About

Copy text via OSC 52 from Vim.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

remote-copy.vim

Copy the text in remote Vim to local clipboard. It depends on OSC52 escape sequences. Unlike other OSC52 Vim scripts (e.g. code snippet in chromium hterm), it solves the flash problem when copy the text.

Requirements

  • Vim 7.3 or higher, Neovim.
  • Python3+.
  • Terminal that supported OSC52 escape sequences.
  • Tmux 3.3 and above: Add set -g allow-passthrough on in tmux config.

Installation

You can install this plugin via Vim plugin managers. Then add following code in your vimrc.

vmap <C-c> y:call remote_copy#copy2clipboard(getreg('"'))<cr>
Plugin 'Hanaasagi/remote-copy.vim'
git clone --depth=1 https://github.com/Hanaasagi/remote-copy.vim ~/.vim/bundle/remote-copy.vim
Plug 'Hanaasagi/remote-copy.vim'
{
    "Hanaasagi/remote-copy.vim",
    config = function()
        vim.keymap.set("v", "<C-c>",
                       [[y:call remote_copy#copy2clipboard(getreg('"'))<CR>]],
                       { silent = true , noremap=true, desc="copy text"})
    end,
},

License

BSD 3-Clause License

Copyright (c) 2021, 秋葉 All rights reserved.

About

Copy text via OSC 52 from Vim.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages