Skip to content

Remote vim paste with rdm does not work as expected #6

@mjacobus

Description

@mjacobus

Hey @BlakeWilliams 👋🏻

I found an issue with my vim copy/paste config. Perhaps the issue is not in vim, but in rdm.

To illustrate, say I am on codepsaces, in a vim buffer with the following content:

one two three
four five
six seven

I am in normal mode, and my cursor is on the "f" from "five". I type yw (yank word), and that should copy the word "five". Then I type P to paste before my cursor, and this is the expected result:

one two three
four fivefive
six seven

But this is the actual result:

one two three
five
four five
six seven

It seems like copy behaves as if I had done a yy, or Y (copy line).

This is my vim config:

https://github.com/mjacobus/dotfiles/blob/3f60925fe661e8e12ddf27a4c235cda4ba849efe/neovim/.config/nvim/config.vim#L403-L410

" Forward clipboard in a codespace
if !empty($CODESPACES)
  let g:clipboard = {"name": "rdm", "copy": {}, "paste": {}}
  let g:clipboard.copy["+"] = ["rdm", "copy"]
  let g:clipboard.paste["+"] = ["rdm", "paste"]
  let g:clipboard.copy["*"] = ["rdm", "copy"]
  let g:clipboard.paste["*"] = ["rdm", "paste"]
endif

Also I played with rdm outside vim, to see if I found any clue.

image

I will dig some more later, and share what I found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions