[GH-ISSUE #977] Request: Text area use VIM keyboard commands #709

Closed
opened 2026-03-04 01:07:11 +03:00 by kerem · 1 comment
Owner

Originally created by @oceaster on GitHub (Apr 29, 2024).
Original GitHub issue: https://github.com/rivo/tview/issues/977

This is a big ask; however since everything else in my tool box uses vim key commands and the application I have built with tview sits right next to my neovim IDE on my screen.

It would be really awesome if I could maybe pass a parameter to a text area that makes it use vim key commands.

I would implement this myself in a PR but I'm probably about 6 months away from being comfortable enough with Go to make such an effort right now.

Originally created by @oceaster on GitHub (Apr 29, 2024). Original GitHub issue: https://github.com/rivo/tview/issues/977 This is a big ask; however since everything else in my tool box uses vim key commands and the application I have built with tview sits right next to my neovim IDE on my screen. It would be really awesome if I could maybe pass a parameter to a text area that makes it use vim key commands. I would implement this myself in a PR but I'm probably about 6 months away from being comfortable enough with Go to make such an effort right now.
kerem closed this issue 2026-03-04 01:07:11 +03:00
Author
Owner

@rivo commented on GitHub (Apr 29, 2024):

You can customize your keybinds using SetInputCapture. Have a look at the linked documentation.

Having said that, although certainly possible, it might be difficult to implement modes like VIM (i.e. normal mode, insert mode, visual mode, command mode etc.). But if it's important to you, give it a shot.

I can tell you that this won't become part of tview for various reasons (see this link for the main one). So I will close this issue now. If you have trouble with SetInputCapture, feel free to open a separate issue.

<!-- gh-comment-id:2082779785 --> @rivo commented on GitHub (Apr 29, 2024): You can customize your keybinds using [`SetInputCapture`](https://pkg.go.dev/github.com/rivo/tview#Box.SetInputCapture). Have a look at the linked documentation. Having said that, although certainly possible, it might be difficult to implement modes like VIM (i.e. normal mode, insert mode, visual mode, command mode etc.). But if it's important to you, give it a shot. I can tell you that this won't become part of `tview` for various reasons (see [this link](https://en.wikipedia.org/wiki/Mode_(user_interface)#Mode_errors) for the main one). So I will close this issue now. If you have trouble with `SetInputCapture`, feel free to open a separate issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#709
No description provided.