ReplMaker.jl
ReplMaker.jl copied to clipboard
Implement repl menu for selecting modes
I think that having fun the package default to binding a repl mode to a key is probably a bad idea.
One idea that may be preferable is if the package hid all new repl modes behind a menu so one has to press one key to bring up a menu of modes and then another key to select which mode they want.
Another possibility is requiring that the key be accompanied by a modifier key. Ie. one must press alt+}
to open the repl mode.
I’m definitely open to suggestions and PRs here. I don’t know how to implement that first idea but the second one is doable.
I'm now also in need of this sort of things. It seems now we can easily achieve it by invoking enter_mode!
?
I tried this way: https://github.com/thautwarm/UsefulModes.jl ,to create a dedicated mode for selecting modes:
using UsefulModes
link_start!()
selector> ast
ast> 1 + 1
Expr
head: Symbol call
args: Array{Any}((3,))
1: Symbol +
2: Int64 1
3: Int64 1
Nice! If you feel like making a PR to ReplMaker.jl with support for a mode selector interface, I'd happily accept it. Otherwise, I'll try to get started on it once I have time.
This PR to Julia might help?