@kmiyh/pi-full-text-paste
v1.0.0
Published
Pi extension that keeps large pasted text expanded instead of collapsing it into [paste #...] markers.
Maintainers
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-pasteKeyboard 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,
⌘Vusually 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:
- Terminal paste: when the terminal sends pasted text, the extension inserts the full text instead of collapsing it.
- 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+Vinterception 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.tsLicense
MIT
