← Catalog

pi-pim

Pim — nvim-style modal editing and chat navigation for Pi.

Package

Install

Install with PiG

pig install npm:pi-pim

Install with Pi

pi install npm:pi-pim
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "image": "./assets/banner-v2.png",
  "extensions": [
    "./index.ts"
  ],
  "changelogPath": "./CHANGELOG.md"
}

README

Written by the package's publisher, shown as published in version 1.0.0 (README.md). PiG does not review it.

Pim

English · Español

Pim - nvim-style navigation in Pi

GitHub stars

⭐ If Pim makes Pi feel like home, star the repo. It helps other Vim users find it.

Pi package

Pim = Pi + Vim. A modal editor for Pi: type in insert mode, press Esc to enter normal mode, and use j/k to scroll the chat transcript — not the prompt history.

Features

  • Insert mode — Pi's normal editor behavior.
  • Normal mode — Esc from insert.
  • Chat scrolling — j/k scroll the transcript one line; Ctrl+D/Ctrl+U half page; Ctrl+F/Ctrl+B page; gg/G top/bottom.
  • Vim-style prompt editing — h/l, 0/$, x, i, a.
  • Mode indicator — NORMAL / INSERT on the editor border.
  • No prompt-history hijack — insert-mode ↑/↓ keep working as Pi normally does.

Keymap

Insert

Standard Pi editing: type, move, paste, autocomplete, Enter to submit, Ctrl+... shortcuts. Esc switches to normal.

Normal

KeyAction
iinsert at cursor
ainsert after cursor
h / lcursor left / right
0 / $line start / end
xdelete character
j / kscroll chat down / up one line
Ctrl+D / Ctrl+Uhalf page down / up
Ctrl+F / Ctrl+Bpage down / up
ggscroll chat to top
Gscroll chat to bottom
Entersubmit the prompt
Escpass through to Pi (interrupt / abort)

Install

From GitHub:

pi install git:github.com/AndresArreguy/pi-pim

Pinned:

pi install git:github.com/AndresArreguy/pi-pim@v1.0.0

From a local clone:

git clone https://github.com/AndresArreguy/pi-pim.git
cd pi-pim
pi install .

Restart Pi or run:

/reload

Pim replaces the main editor via ctx.ui.setEditorComponent(). Remove other custom-editor extensions if you have one installed; the last registration wins.

Requirements

  • Pi 1.5.x.
  • Node.js 22.6+.
  • Fullscreen mode (tuiMode: "fullscreen", Pi's default) for transcript scrolling. In regular mode the modal editing still works, but j/k, Ctrl+D/U, Ctrl+F/B and gg/G have no transcript viewport to scroll.

How it works

Pim extends Pi's CustomEditor:

  1. On session_start it calls ctx.ui.setEditorComponent() with a modal editor.
  2. handleInput intercepts Esc and normal-mode keys.
  3. j/k, page keys and gg/G call the fullscreen TUI's scrollBy, scrollToTop and scrollToBottom, so they move the transcript where agent responses arrive.
  4. The bottom border is extended with the current mode.

It does not modify the prompt history or Pi's transcript.

Limitations

  • Fullscreen-only transcript scrolling.
  • This is a focused modal layer, not a full Vim: no operators (dw, ciw), visual mode, registers, or : commands (yet).
  • Esc in normal mode keeps Pi's interrupt/abort behavior.

Development

git clone https://github.com/AndresArreguy/pi-pim.git
cd pi-pim
npm run check      # syntax check, no build step
pi install .       # load the local package

Edit index.ts, run /reload in Pi, and test in a fullscreen session.

Contributing

Contributions are welcome. Read CONTRIBUTING.md and the Code of Conduct. Issues and PRs can be in English or Spanish. Security reports: SECURITY.md.

⭐ Support

If Pim makes Pi feel like home, please star the repo:

GitHub stars

Issues and pull requests are welcome.

Credits

Built on Pi by the Pi team.

License

MIT © 2026 Andres Arreguy.