You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally reported by: topher200 (Bitbucket: topher200, GitHub: topher200)
=== Expected behavior ===
User enters insert mode and starts typing a function. should yield a new line, with the cursor at the correct auto-indent location.
=== Actual behavior ===
User enters insert mode and starts typing a function. yields a new line, with the cursor all the way to the left column.
=== Observations ===
Exiting insert mode and auto-indenting the code ("==") fixes the problem, which shows that evil knows how to indent the code - it's just not doing it.
Emac's describe-key shows that the function being called for in insert mode is "newline". I would expect it to call "evil-ret". "evil-ret" is called on in normal mode, and its documentation talks about it handling insert-mode.
"customize-group" shows that the "auto indent" variable is set to default. That seems to be working fine- creating a new line by entering insert-mode (with "o" or "O") yields a newline with the cursor in the correct spot.
=== Steps to reproduce ===
Write the first line to a function with nested indentation. Example:
(if (not
and press . Notice that the cursor is on the newline on the far left, as shown here by the "|":
This seems like a strange bug to exist; it's easily fixable, and pretty obvious behavior. That leads me to believe that it's being caused by some strangeness on my machine, but if it is I can't track it down.
Original comment byMichael Markert (Bitbucket: cofi, GitHub: cofi):
The binding has been removed on purpose:
commit 6b1e5ab78123e64e50a2401bc5fee11486854d40
Author: Vegard Øye <vegard_oye@hotmail.com>
Date: Thu Oct 6 15:11:36 2011 +0200
Remove Insert state binding for "RET"
Unbind `evil-ret' in Insert state. Many modes bind "RET" to a custom
command, so it is best to leave this key alone in Insert state.
Originally reported by: topher200 (Bitbucket: topher200, GitHub: topher200)
=== Expected behavior ===
User enters insert mode and starts typing a function. should yield a new line, with the cursor at the correct auto-indent location.
=== Actual behavior ===
User enters insert mode and starts typing a function. yields a new line, with the cursor all the way to the left column.
=== Observations ===
Exiting insert mode and auto-indenting the code ("==") fixes the problem, which shows that evil knows how to indent the code - it's just not doing it.
Emac's describe-key shows that the function being called for in insert mode is "newline". I would expect it to call "evil-ret". "evil-ret" is called on in normal mode, and its documentation talks about it handling insert-mode.
"customize-group" shows that the "auto indent" variable is set to default. That seems to be working fine- creating a new line by entering insert-mode (with "o" or "O") yields a newline with the cursor in the correct spot.
=== Steps to reproduce ===
Write the first line to a function with nested indentation. Example:
and press . Notice that the cursor is on the newline on the far left, as shown here by the "|":
I would expect the cursor to be here:
The text was updated successfully, but these errors were encountered: