Iex: behaviour of backspace - whole words being deleted

I’m using Elixir 1.15.0 on Arch Linux. I noticed that when pressing backspace in iex, not only one single character left to the cursor is deleted, but an entire word or some other tokens.
I understand that this behaviour can be useful, but since I’m not used to that behaviour, I’d rather only have one single character deleted.
Can I configure iex somehow accordingly?

What you describe is not expected behaviour. This is likely a bug or unintended interplay of what is used to interact with iex. So no there’s no configuration. I’d report that to the elixir repo as an issue. If you’re using OTP 26, then you’ll also get the new shell that OTP version comes with as well as the therefore fresh integration of elixir with that new shell. Maybe try using a more recent patch version of 1.15 and see if you ran into an already fixed bug.

1 Like

Thanks for your reply, and sorry for not coming back to you. I had very little time in the last few days.

As figured out on StackOverflow, the issue also happens in erl, but not in any other REPL. So I wonder where to carry my issue. There must be some common ground, i.e. some library providing REPL functionality, written in Erlang.

The shell is part of OTP indeed. Elixir just builds on top of that.

1 Like

OK, I opened an issue: Backspace deletes too much in `erl` (and `iex`) REPL · Issue #7776 · erlang/otp · GitHub

FWIW, I just ran into this for the first time yesterday when running iex on a machine. My app is running the latest of both Elixir and Erlang (1.15.7/26.1.1). I tried on another app using older versions (1.14.2/25.2) and it does not have the issue.

I have the same strange behavior of backspace, but I found that it is when using Terminology terminal only. When using konsole, it behaves as expected.