When typing ()
in IEx 1.2.4, the cursor would "jumping" to the matching parenthesis for 1s and move back. Even though it's not really jumping but it's kinda annoying to the eye. Is there a way to disable this feature in IEx?
EDIT:
While the question originally concerned IEx, the actual issue (as pointed out by @tkowal in his comment below) is actually in the Erlang Shell which IEx runs on top of. Hence I added the erlang-shell tag to this question.
The cursor jumping happens in lib/stdlib/src/edlin.erl
(in Erlang's stdlib
). Specifically, it seems to happen at lines 205 through 213, which is where )
, ]
, and }
appear to be captured and converted into instructions to move the cursor (which are then sent through various processes in erl
's supervision tree all the way up to user_drv
, which then sends the necessary commands to the tty_sl
port to make the cursor movement requests happen).
Unfortunately, there's no way (AFAICT) to disable that functionality that doesn't involve patching the code in that spot (whether by commenting out those lines or by adding additional guards to check for a new option passed to erl
). If you're up for patching that file and recompiling Erlang, then go for it. Else, it's at least a starting point for someone to try implementing a configuration option around that behavior.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With