rivo / tview

Terminal UI library with rich, interactive widgets — written in Golang
MIT License
10.33k stars 545 forks source link

Request: Text area use VIM keyboard commands #977

Closed oceaster closed 2 months ago

oceaster commented 2 months ago

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.

rivo commented 2 months ago

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.