Vim: Support for `clipboard=unnamed` / using system clipboard for unnamed register

Created on 25 Aug 2016  路  7Comments  路  Source: VSCodeVim/Vim

A setting to use the unnamed register as alias for the * register. So yy for example copies to current line to the system clipboard, and p would insert from the clipboard.

Should be a user setting (e.g. useSystemClipboard), and disbaled by default.

Further readings:

kinfeature sizS

Most helpful comment

@rebornix Sure, I will send a pr tonight ;-)

All 7 comments

We've supported Vim configurations so it would be easy to add useSystemClipboard. @aminroosta , you may be interested in this task since you are the Father of Clipboard :)

Anyone who is interested in contributing can take it as well.

@rebornix Sure, I will send a pr tonight ;-)

@rebornix Sorry for the delay, i completely forgot about it 馃槩
Please let me know if you want any changes to the PR #655

I wanted to write a test for this but our newTest and newTestOnly functions are async. It's not easy to test new configuration options without affecting other tests.

@rebornix @johnfn I think it might be a good time to overload these functions to offer preparation and clean up callabacks. That way we can test new configuration options without affecting other tests.

@aminroosta how about putting those tests sharing the same configuration into one suite and leverage the setup and teardown?

This is closed with PR https://github.com/VSCodeVim/Vim/pull/665. Thanks @aminroosta

To use, add the following to your user/workspace settings:

  "vim.useSystemClipboard": true

This doesn't appear to be working for me. When enabled yank no longer seems to do anything. After a yank I'm unable to paste in the system or in VS Code (for instance p). Using Ubuntu 16.04. My settings are:

{
    "vim.useCtrlKeys": true,
    "vim.useSystemClipboard": true
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jaredly picture jaredly  路  3Comments

typeoneerror picture typeoneerror  路  3Comments

rajinder-yadav picture rajinder-yadav  路  3Comments

st-schneider picture st-schneider  路  3Comments

AndersenJ picture AndersenJ  路  3Comments