https://github.com/mieubrisse/vim-bubble
A BubbleTea component for emulating a Vim buffer
https://github.com/mieubrisse/vim-bubble
bubbletea vim
Last synced: 2 months ago
JSON representation
A BubbleTea component for emulating a Vim buffer
- Host: GitHub
- URL: https://github.com/mieubrisse/vim-bubble
- Owner: mieubrisse
- Created: 2023-04-17T01:12:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-23T14:41:32.000Z (about 3 years ago)
- Last Synced: 2026-03-25T03:24:02.413Z (3 months ago)
- Topics: bubbletea, vim
- Language: Go
- Homepage:
- Size: 75.2 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Vim Bubble
==========
This repository contains a [BubbleTea](https://github.com/charmbracelet/bubbletea) [Bubble](https://github.com/charmbracelet/bubbles) that emulates some common Vim functionality inside of the BubbleTea framework. It is built on a heavily-modified fork of Charm's [textarea Bubble](https://github.com/charmbracelet/bubbles#text-area).
Loom demo video: https://www.loom.com/share/40b389a2e694408aa2b74d1f9b02d1dc
How to use
----------
```bash
go get github.com/mieubrisse/vim-bubble
```
```go
vim := vim.New()
```
Functionality
-------------
### Supported
- Normal & insert modes (via `i` and `a`)
- Common movement commands (`h`, `j`, `k`, `l`, `w`, `e`, `b`, `ge`, `^`, `$`, `0`, `gg`, `G`, etc.)
- Common editing functionality (`dd`, `cc`, `D`, `C`, `x`, `p`, `o`, `O`, etc.)
- Undo & redo (via `u` and `ctrl+r`)
### Not supported but probably will
- GIF to demo this
- Numbered-repeat (e.g. `20j`, `10g`)
- `t`,`f`,`;`,`,`
- Visual mode
- Page up/down
- Different stylings on the UI elements
### Not supported & not planning (PRs welcome)
- Registers
- Little vs big word distinction
- `%` for jump-to-matching support
- `zz`
- `H`, `M`, `L`
Why?
----
I needed a text area for a BubbleTea app I was building, and I wasn't happy with the limited, emacs-like bindings on the default textarea. Hopefully this is useful for other Vim nerds.