Closed Jollywatt closed 1 year ago
Note this is related, but not a duplicate. Note this only happens when using a startup file.
Edit: Not a duplicate of #227 (comment), but is a duplicate of #166 .
I’ve discovered that this bug (typing [1]
and getting [1]]
), which is only observed when loading OhMyREPL
in the startup.jl
file, is fixed by another call to OhMyREPL.__init__()
in the REPL after startup.
This suggests that something happens after the startup.jl
file is run, but before the julia>
prompt is displayed, which overrides the keymap for “]
”. Maybe there is some initialisation for the pkg>
REPL mode which causes this?
My hacky solution for the meantime is to have this in my startup.jl
file:
using OhMyREPL
schedule(@task begin
sleep(0.1)
OhMyREPL.__init__()
end)
This reruns OhMyREPL.__init__()
after the julia>
prompt displays and fixes my issue.
I just found a duplicate issue with the same hacky solution from three years ago! 😅
Duplicate: #166
(Closing since duplicate)
I’m experiencing a small (but annoying) bug with autocompleted square brackets.
The expected behaviour is that typing
[x
OR[x]
produces[x]
in the REPL (soft autocompletion). However, if I type[x]
, I get[x]]
, i.e., the autocompleted]
is not replaced by the manually-inserted]
. This only happens with[]
; other delimiters like()
,{}
,""
,''
work as expected.The strange thing about this is that it only happens when
using OhMyREPL
is in thestartup.jl
file. Runningjulia --startup-file=no
followed byjulia> using OhMyREPL
works fine.I’m struggling to debug why. Tested on macOS and Ubuntu with julia
1.7.2
and1.7.3
.