'Emacs lisp, How to make a newline in IELM?

Even the basic things seem to be hidden behind weird shortcut-combinations. How can I (hopefully without too many c-m-x-c combinations) create a simple new line?

return evaluates the current line



Solution 1:[1]

With C-j. That said, if you have paredit enabled, it should do all the newlines you need automatically.

Solution 2:[2]

In my case it was M-j.

I'm currently trying out SpaceMacs, not sure if that has anything to do with it.

Solution 3:[3]

Even the basic things seem to be hidden behind weird shortcut-combinations.

If you don't want RET to have contextual behaviour, you can M-x customize-option RET ielm-dynamic-return.

How can I ... create a simple new line?

Only a newline? C-qC-j is the normal way to enter a newline in places where RET does something else. (More generally you can use C-q to insert any character that isn't self-inserting for the current buffer.)

If you want newline + indentation (which is what RET does when contextually appropriate), then M-j will do that (noting that if you are in a comment at the time then the new line will also default to a comment).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 vukung
Solution 2 tripleee
Solution 3 phils