npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-vim-motions

v1.0.1

Published

Vim-style motion extension for Pi.

Readme

Pi Vim Motions Extension

Vim Motions extension and keybindings for pi

How to install

  • pi install npm:pi-vim-motions
  • add into ~/.pi/keybindings.json:
{
  "tui.editor.cursorLeft": [
    "left",
    "ctrl+h"
  ],
  "tui.editor.cursorDown": [
    "down",
    "ctrl+j"
  ],
  "tui.editor.cursorUp": [
    "up",
    "ctrl+k"
  ],
  "tui.editor.cursorRight": [
    "right",
    "ctrl+l"
  ],
  "tui.select.down": [
    "down",
    "ctrl+n",
    "ctrl+j"
  ],
  "tui.select.up": [
    "up",
    "ctrl+p",
    "ctrl+k"
  ],
  "tui.editor.deleteToLineEnd": [
    "alt+k"
  ],
  "app.model.cycleForward": [
    "alt+p"
  ],
  "app.model.cycleBackward": [
    "shift+alt+p"
  ]
}

app.model.cycleForward, app.model.cycleBackward and tui.editor.deleteToLineEnd conflict with what is usually used by neovim for example as navigating selectors.

Usage

  • Default mode: INSERT
  • escape in INSERT → NORMAL
  • escape in NORMAL keeps base escape/cancel behavior
  • i in NORMAL → INSERT
  • a in NORMAL → move right one char, then INSERT
  • u in NORMAL → undo (supports counts, e.g. 2u)
  • Unmapped printable keys in NORMAL are ignored (no text inserted)

Implemented commands (current)

Motions

  • h / j / k / l: left/down/up/right
  • w / b / e: word motions
  • W / B / E: same as lowercase in current implementation
  • 0 / ^: line start
  • $: line end
  • f<char>: find next matching char on line
  • F<char>: find previous matching char on line
  • gg: first line
  • G: last line
  • Counts in normal mode (3w, 5l, etc.)

Delete

  • x: delete char under cursor (stores deleted char in register)
  • d enters pending operator state
  • Supported completions:
    • dd (delete current line, stores linewise)
    • dh / dl
    • dw / db / de / dW / dB / dE
    • d0 / d^ / d$
    • df<char> / dF<char>
  • D: delete to end of line
  • If second key is unsupported, delete is canceled with no text change
  • escape cancels pending delete
  • Counts supported (2x, 2dd, d2w)
  • Mode stays NORMAL after delete commands

Change / Substitute

  • C: change to end of line (delete to EOL and enter INSERT)
  • S: substitute current line (clear line and enter INSERT)

Yank / Paste

  • y enters pending operator state
  • Supported completions:
    • yy (yank current line, linewise)
    • yw / yb / ye / yW / yB / yE
    • y0 / y^ / y$
    • yf<char> / yF<char>
  • Y: yank to end of line
  • p: paste after cursor (or below for linewise register)
  • P: paste before cursor (or above for linewise register)
  • If second key is unsupported, yank is canceled with no text change
  • escape cancels pending yank
  • Counts supported (y3w etc.)

Regression expectations

  • INSERT mode keeps normal typing behavior
  • enter submits
  • shift+enter inserts newline
  • Control/system shortcuts (like ctrl+c, ctrl+d) continue to work

Out of scope (v1)

In order of when its likely to be implemented:

  • Visual mode
  • redo: not implemented in pi itself
  • Text objects (diw, ci(, etc.)
  • Repeat (.), macros, named registers
  • Search motions/repeats (/, ?, n, N, ;, ,)
  • Full WORD/edge-accurate Vim parity
  • ;/, repeat-find

Development

This is its own package with its own tooling so that its not depending on pi's environment for development. Just run pnpm install to pull necessary dependencies and pnpm test to run the test suite.

I added some basic agent related things and fallow. You can of course make a pull request if you have something you want to extend but please don't just let the coding agent go ham on it.

Otherwise raise an issue and I can have a look at it.

Next step in this is probably to tidy up the commands.ts and introduce a bit more extendable structure to it. I will see how I can extend pi. For now its more so I can edit text properly inside pi.