[erlang-questions] How to disable parentheses matching in Erlang shell?

Grzegorz Junka list1@REDACTED
Tue May 17 19:55:22 CEST 2016

Sverker, I have a simple application which you could quickly compile to 
be able to easily reproduce this issue. Just execute those steps (one by 

mkdir test_sc
cd test_sc/
git clone https://github.com/builderl/ex1_simple_cache.git
cd ex1_simple_cache/
gmake get-deps
gmake dev
to_erl ../sc-1/shell/

This will pull an application, get all its dependencies, compile, 
install, configure, start and connect to one of the running nodes (there 
will be two running nodes from the same release).

I hope that will be helpful but of course I am happy to recompile the 
OTP from your branch and retry if needed.


On 17/05/2016 17:01, Grzegorz Junka wrote:
> :(
> As soon as I closed the bracket after typing {e, 5} from my example 
> the cursor jumped some 10 columns to the right and then to the 
> beginning of the line. That's how far it got (without the fix the 
> cursor would jump incorrectly only after closing ']').
> (sc-1@REDACTED)1> lists:sort([{a, 1}, {b, 2}, {c, 3}, {d, 
> 4}, {e, 5}
> Grzegorz
> On 17/05/2016 13:10, Sverker Eriksson wrote:
>> Could you test this fix and see if it makes the cursor behave
>> when connected with to_erl/run_erl.
>> git fetch https://github.com/sverker/otp sverker/ttsl_drv-move-down
>> /Sverker, Erlang/OTP
>> On 05/15/2016 11:45 PM, Grzegorz Junka wrote:
>>> I just realized what is likely causing the problem. When I start the 
>>> shell with erl and type in this testing string (with spaces so it's 
>>> longer) it all works fine:
>>> lists:sort([{a, 1}, {b, 2}, {c, 3}, {d, 4}, {e, 5}, {f, 6}, {g, 7}, 
>>> {h, 8}, {i, 9}, {j, 10}]).
>>> But I very rarely use Erlang shell in this way. Most of the time I 
>>> am connecting to running Erlang nodes using to_erl specifying the 
>>> shell's PID. Then it breaks, probably because my terminal size 
>>> doesn't match the default terminal size with which the shell has 
>>> been originally started.
>>> When I then try to type in the same example the shell will match 
>>> each {} correctly but as soon as I type ']' to close the list the 
>>> cursor jumps to the line above, then some other place when I type ')'.
>>> So it's not related to the environment but to the way I am using 
>>> Erlang shell. Is there any solution to that?
>>> Grzegorz

More information about the erlang-questions mailing list