bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62536: 30.0.50; Can we add """ ... """ electric pair in elixir, just


From: Wilhelm Kirschbaum
Subject: bug#62536: 30.0.50; Can we add """ ... """ electric pair in elixir, just like python
Date: Sun, 02 Apr 2023 19:21:50 +0200
User-agent: mu4e 1.9.3; emacs 30.0.50


Mou Tong <mou.tong@outlook.com> writes:

Will it make sense to also add a newline when closing a multiline comment/heredoc? It feels smoother to me rather than having to press enter and then C-o ( open-line ) to position the cursor correctly?

I agree with you, but I think it might be better to imitate what
`c-mode` did:

```c
int main () {|}
```

When `electric-pair-mode` is on, input the left `{`, Emacs helps you complete the right `}`. After press enter, your cursor will move to the
next line and auto-indented according to your offset config:

```c
int main () {
  |
}
```

So how about making it work like this?

```elixir-ts
@doc """|"""

# after press enter
@doc """
  |
"""
```

Yes, I think that is better, let me have a go at it. I was concerned of doing unsolicited movement with my suggestion of inserting newlines.








reply via email to

[Prev in Thread] Current Thread [Next in Thread]