@kmiyh/pi-full-text-paste

Pi extension that keeps large pasted text expanded instead of collapsing it into [paste #...] markers.

Package details

extension

Install @kmiyh/pi-full-text-paste from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@kmiyh/pi-full-text-paste
Package
@kmiyh/pi-full-text-paste
Version
1.0.0
Published
Apr 17, 2026
Downloads
140/mo · 6/wk
Author
kmiyh
License
MIT
Types
extension
Size
12.3 KB
Dependencies
1 dependency · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@kmiyh/pi-full-text-paste

@kmiyh/pi-full-text-paste is a Pi extension that keeps pasted text as full editor text.

By default, Pi may collapse large pastes into markers like [paste #1 +123 lines]. This extension disables that behavior and keeps the full pasted content directly in the input editor.

What it does

  • inserts large pasted text as full text
  • prevents [paste #...] placeholders for big text pastes
  • works with normal terminal paste / bracketed paste
  • handles common paste shortcuts
  • preserves Pi image paste: if the clipboard contains an image, the image paste wins

Installation

pi install npm:@kmiyh/pi-full-text-paste

Keyboard shortcuts

System Use
macOS ⌘V or Ctrl+V
Windows Ctrl+V, Ctrl+Shift+V, or Alt+V
Linux Ctrl+V, Ctrl+Shift+V, or Shift+Insert

Notes:

  • On macOS, ⌘V usually reaches Pi as a normal terminal paste event, not as a raw keybinding.
  • The extension also recognizes raw shortcuts Pi receives: Ctrl+V, Alt+V, Ctrl+Shift+V, Shift+Insert.

How it works

The extension replaces Pi's default editor with a custom editor and changes paste handling in two places:

  1. Terminal paste: when the terminal sends pasted text, the extension inserts the full text instead of collapsing it.
  2. Clipboard shortcut paste: when Pi receives a supported paste shortcut, the extension checks the clipboard.

Priority is:

  • image in clipboard → use Pi's normal image paste
  • text in clipboard → insert full text

Limitations

  • affects only the interactive TUI editor
  • true low-level Command+V interception is not generally possible inside terminal apps on macOS
  • if a terminal does not support normal paste events and does not pass through a supported paste shortcut, behavior may depend on that terminal
  • if the clipboard contains both image and text, image is preferred for raw shortcut paste

Local development

npm install
npm run typecheck
pi -e ./src/index.ts

License

MIT