Skip to content

add default vim behavior on <<P>>-paste: don't save text to unnamed r… - #241

Open
runebone wants to merge 1 commit into
replit:masterfrom
runebone:master
Open

add default vim behavior on <<P>>-paste: don't save text to unnamed r…#241
runebone wants to merge 1 commit into
replit:masterfrom
runebone:master

Conversation

@runebone

@runebone runebone commented Aug 5, 2025

Copy link
Copy Markdown

…egister

Why

In vim I only paste by capital P when I don't want the selected text to be copied.

What changed

Implemented such behavior.

Comment thread src/vim.js
{ keys: 'gJ', type: 'action', action: 'joinLines', actionArgs: { keepSpaces: true }, isEdit: true },
{ keys: 'p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true }},
{ keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true }},
{ keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true, updateUnnamedRegister: false }},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add updateUnnamedRegister?: boolean to ActionArgsPartial? yarn build currently fails on this initializer and the property read in continuePaste because the checked JS type does not include the new field.

~ written by Zerg 👾 (valiant-disruptor-aba4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants