Markpad icon indicating copy to clipboard operation
Markpad copied to clipboard

VIM mode should yank to system clipboard

Open SamHasler opened this issue 2 months ago • 2 comments

Markpad version

2.7.6

How did you install it?

Windows — installer (Markpad_…_setup.exe)

OS and version

Windows 11

What happens, and what you expected instead

With VIM mode turned on, selecting text and yanking (y) should insert yanked text in the system clipboard.

Steps to reproduce

  1. Turn on VIM mode in settings
  2. Go to editor
  3. select text and yank
    • Press y y to yank line
    • Press V to enter visual mode, h/j/k/l to select text, y to yank

The Markdown that triggers it


Screenshots, and anything else

No response

SamHasler avatar Sep 14 '26 09:09 SamHasler

Thanks. We're adding the "+ and "* registers instead of making plain y copy to the clipboard: https://github.com/sftwrdotdev/Markpad/pull/781

The reason: in Vim, y, d, x and c all write the same unnamed register. If that register went to the system clipboard, every x or dd would replace whatever you had copied from another app. Vim only does that when you opt in with set clipboard=unnamedplus, and Markpad has no :set for it.

With the PR, "+yy or "+y in visual mode copies to the clipboard, and plain y keeps working as it does now. One limit: "+p pastes your last "+ yank, not what another app copied. For that, press Ctrl+V in insert mode (in normal mode Ctrl+V starts a block selection).

PathGao avatar Sep 15 '26 09:09 PathGao

comming with next release

PathGao avatar Sep 15 '26 11:09 PathGao