Last active
September 3, 2020 22:19
-
-
Save Moelf/d1f366b4005f71edc80b24dc43ef1857 to your computer and use it in GitHub Desktop.
Fzf Julia REPL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import REPL | |
import REPL.LineEdit | |
import JLFzf | |
const mykeys = Dict{Any,Any}( | |
# primary history search: most recent first | |
"^R" => function (mistate, o, c) | |
line = JLFzf.inter_fzf(JLFzf.read_repl_hist(), | |
"--read0", | |
"--tiebreak=index" | |
"--height=80%"); | |
JLFzf.insert_history_to_repl(mistate, line) | |
end, | |
) | |
function customize_keys(repl) | |
repl.interface = REPL.setup_interface(repl; extra_repl_keymap = mykeys) | |
end | |
atreplinit(customize_keys) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment