Skip to content

HoraDomu/Vypl

Repository files navigation

Vypl

License Python 3.11+ Platform


Vypl demo

Python REPL with actual Vim modal editing. Not a plugin, not a wrapper just works in the terminal.

Ever wanted a Python REPL with Vim modal editing. Syntax highlighting, autocomplete, macros, registers, text objects the whole shebang? Here ya go.

Install

pip install vypl
git clone https://github.com/HoraDomu/Vypl
cd Vypl
pip install -e .

Usage

vypl

Vim

ESC → normal mode. i / a / A / I → insert.

Keybind Action
h j k l Move / history
w b e Word motions
0 $ Line start / end
f{char} / F{char} Find forward / backward
; / , Repeat / reverse find
r{char} Replace char
x Delete char
d c y + motion Delete / change / yank
dd cc yy Full line ops
[count]op[count]motion 3dd, d3w, 2x, etc.
p / P Paste after / before
"a"z Named registers
v Visual → d / y / c
o / O New line below / above
gg / G First / last buffer line
K Inspect symbol
. Repeat last change
u Undo
q{a-z} / @{a-z} Record / replay macro
/ n N Search history

Text Objects

Object
iw / aw word
i" / a" double quotes
i' / a' single quotes
i( / a( parens
i[ / a[ brackets
i{ / a{ braces

Ex Commands

: in normal mode.

Command
:w [file] Save session
:r file.py Load and run file
:s/old/new/ Substitute
:s/old/new/g Substitute all
:history Command history
:clear Clear screen
:q Quit

Platform

Unix terminal required. Linux and macOS run natively. Windows → WSL or Docker.

git clone https://github.com/HoraDomu/Vypl
cd Vypl
docker build -t vypl .
docker run -it vypl

Contributing

Contributions are welcome. Open an issue or pull request on GitHub. By submitting a contribution you agree to the Contributor License Agreement. Vypl is licensed under the Elastic License 2.0 you may not sell, white-label, or host it as a managed service.

Credits

Built on bpython But I gutted a lot of the code. It was old. Vypl adds essentially the workflow of vim, faster optimzations, more tests, less bloat, a cleaner aesthetic, and Docker support.

About

A lightweight Python REPL with Vim like inputs

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages