Following the directions in the documentation, I added the following into my startup.jl
in order to make ctrl + backspace
delete the previous word and ctrl + delete
delete the next word:
using REPL
using REPL.LineEdit
const mykeys = Dict{Any,Any}(
"^H" => (s, o...) -> LineEdit.edit_delete_prev_word(s),
"^[[3;5~" => (s, o...) -> LineEdit.edit_delete_next_word(s),
)
function customize_keys(repl)
repl.interface = REPL.setup_interface(repl; extra_repl_keymap = mykeys)
end
atreplinit(customize_keys)
This worked, but had the unfortunate side effect that backspace
without ctrl
also deletes a full word. Is there a way that I can map an action to ctrl + backspace
without also mapping it to backspace
? I tried "^\b"
, but that gave me InexactError: trunc(UInt32, -56)
. Any ideas?