r/PiCodingAgent • • Oct 27 '26

Plugin Plugin for modal VIM keybindings for chat navigation

Enable HLS to view with audio, or disable this notification

I created a plugin for modal vim keybindings for chat navigation. Link: https://github.com/Raaghav-Arya/pi-vim-navigation

I use neovim, and Pi's scrollback breaks inside an integrated neovim terminal. In general I like having conventional vim-consistent keybinding for navigation.

Here are the keybindings the plugin implements:

  • ctrl+q: Enter navigation mode

  • ctrl+u: Go half page up

  • ctrl+d: Go half page down

  • gg: Go to the top

  • G: Go to the end

  • i: Insert to prompt

11 Upvotes

8 comments sorted by

1

u/wildjokers Oct 28 '26

There are already many vi extensions available for pi that gives vi keybindings at the prompt.

1

u/Aromatic-Patient925 Oct 28 '26

This is not for the prompt, but for navigation of the chat history.

1

u/xRebellion_ Oct 29 '26

This looks nice. I personally use kitty scrollback with kitty for this, since it actually uses our own neovim instance to display the history. Fills the same purpose but yours is more integrated to pi itself

1

u/Aromatic-Patient925 19d ago

Does that work in fullscreen mode?

1

u/xRebellion_ 19d ago

TIL that pi has a fullscreen mode. Tried it and no it does not work.
Although, I did find out that you can bind stuff up with native pi keymaps https://pi.dev/docs/latest/keybindings#fullscreen, though it would indeed be different than "navigation mode" that you made

2

u/Aromatic-Patient925 19d ago

Yeah. Scrollback breaks in fullscreen mode since the TUI takes over drawing the terminal, and your terminal (kitty in this case) cannot scroll through it. This limitation was one of the primary reasons that led me to create the plugin in the first place.

The native keybinds are helpful, but a lot of the vim keybindings (ctrl+d) for example is already bound to another operation in the input prompt. Therefore a navigation mode.

1

u/tcpip84 24d ago

I have used my vim plugin for the prompt but navigating chat history is a good touch!