Skip to content

Instantly share code, notes, and snippets.

@Moelf
Last active September 3, 2020 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Moelf/d1f366b4005f71edc80b24dc43ef1857 to your computer and use it in GitHub Desktop.
Save Moelf/d1f366b4005f71edc80b24dc43ef1857 to your computer and use it in GitHub Desktop.
Fzf Julia REPL
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