Skip to content

Add -confirm and -immediate variants for clipboard-paste - #552

Merged
lambdalisue merged 1 commit into
lambdalisue:mainfrom
davidscholberg:paste-immediate
Jun 1, 2026
Merged

Add -confirm and -immediate variants for clipboard-paste#552
lambdalisue merged 1 commit into
lambdalisue:mainfrom
davidscholberg:paste-immediate

Conversation

@davidscholberg

@davidscholberg davidscholberg commented May 23, 2026

Copy link
Copy Markdown
Contributor

This change adds the following actions:

<Plug>(fern-action-clipboard-paste-confirm)
<Plug>(fern-action-clipboard-paste-immediate)

Where -confirm prompts the user for confirmation when moving a file and -immediate does not. <Plug>(fern-action-clipboard-paste) now maps to <Plug>(fern-action-clipboard-paste-confirm), which was the default behavior of the clipboard paste action before this change. As such, this is not a breaking change.

Fixes #551.

Summary by CodeRabbit

  • New Features

    • Clipboard paste now offers two modes: paste with confirmation (default) and immediate paste to skip the confirmation when moving files.
  • Documentation

    • Docs updated to describe the two paste variants and their confirmation behavior, and note the default mapping remains the confirm variant.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 23, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 57a1ff45-0483-44c6-b4a6-da04e8ca8621

📥 Commits

Reviewing files that changed from the base of the PR and between 7f86797 and eb7c524.

📒 Files selected for processing (3)
  • autoload/fern/scheme/dict/mapping/clipboard.vim
  • autoload/fern/scheme/file/mapping/clipboard.vim
  • doc/fern.txt
✅ Files skipped from review due to trivial changes (1)
  • doc/fern.txt

📝 Walkthrough

Walkthrough

Splits the clipboard paste action into two variants (confirm-required and immediate) across dict and file schemes and updates documentation; handlers now accept a boolean flag to skip the move confirmation prompt.

Changes

Clipboard paste action split into confirm/immediate variants

Layer / File(s) Summary
Dict scheme paste action split
autoload/fern/scheme/dict/mapping/clipboard.vim
Adds separate fern-action-clipboard-paste-confirm and fern-action-clipboard-paste-immediate mappings, and updates the handler to accept a confirm_move parameter that gates the move confirmation prompt.
File scheme paste action split
autoload/fern/scheme/file/mapping/clipboard.vim
Implements the same paste action split as dict scheme: separate confirm/immediate mappings with the alias pointing to confirm, and handler parameter for conditional move confirmation.
Clipboard paste action documentation
doc/fern.txt
Documents the three clipboard paste variants and clarifies the behavior difference: confirm variant prompts before moving files, while immediate variant skips the confirmation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • lambdalisue

Poem

🐰 I hopped through code with ears held high,

Split paste paths under moonlit sky.
Confirm or quick — the choice is near,
No more prompts to cause a tear.
Files move swift, the rabbit cheers!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding variant forms (-confirm and -immediate) for the clipboard-paste action.
Linked Issues check ✅ Passed The PR fulfills issue #551 by introducing -confirm and -immediate variants for clipboard-paste, providing the requested mechanism to bypass the confirmation prompt when moving files.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing the clipboard-paste variants; no out-of-scope modifications are present in the three files modified.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@doc/fern.txt`:
- Line 1309: Replace the misspelled word "defalut" with "default" in the
sentence containing "files (this is defalut), and the immediate variant skips
this prompt." so the text reads "files (this is default), and the immediate
variant skips this prompt."
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 93514b40-6ae9-48a0-baad-27d11ac1c1c4

📥 Commits

Reviewing files that changed from the base of the PR and between b4520a5 and 7f86797.

📒 Files selected for processing (3)
  • autoload/fern/scheme/dict/mapping/clipboard.vim
  • autoload/fern/scheme/file/mapping/clipboard.vim
  • doc/fern.txt

Comment thread doc/fern.txt Outdated
This change adds the following actions:

```vim
<Plug>(fern-action-clipboard-paste-confirm)
<Plug>(fern-action-clipboard-paste-immediate)
```

Where `-confirm` prompts the user for confirmation when moving a file
and `-immediate` does not. `<Plug>(fern-action-clipboard-paste)` now
maps to `<Plug>(fern-action-clipboard-paste-confirm)`, which was the
default behavior of the clipboard paste action before this change. As
such, this is not a breaking change.

Fixes lambdalisue#551.

@lambdalisue lambdalisue left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM

@lambdalisue

Copy link
Copy Markdown
Owner

CI failed but #549 so it's ok.

@lambdalisue
lambdalisue merged commit 4126111 into lambdalisue:main Jun 1, 2026
10 of 13 checks passed
@lambdalisue

Copy link
Copy Markdown
Owner

Thanks a lot 🎉

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.

Bypass prompt for <Plug>(fern-action-clipboard-paste)?

2 participants