msteveb / jimtcl

Official repository of Jim Tcl, an open-source, small footprint implementation of Tcl
http://jim.tcl.tk/
Other
432 stars 123 forks source link

vi key bindings in jimsh #260

Closed vetelko closed 1 year ago

vetelko commented 1 year ago

Hello Steve, everyone is there a chance that vi editing mode will be available in jimsh ... sometimes :)

msteveb commented 1 year ago

Two options. Someone could add vi mode support to https://github.com/msteveb/linenoise or you could use readline, either with the readline extension or rlwrap. From rlprompt.tcl:

# In order to automatically have readline-editing features
# put this in your $HOME/.jimrc
#
# if {$jim_interactive} {
#    if {[catch {package require rlprompt}] == 0} {
#       rlprompt.shell
#    }
# }
vetelko commented 1 year ago

Thank you, Steve, it works with tcl_interactive, jim_interactive is undefined

msteveb commented 1 year ago

Thanks for letting me know, I'll update the comment in rlprompt.tcl