-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indent region breaks logic #195
Comments
Yes I can confirm this. It is even worse that this. Sometimes |
you can set |
@yuutayamada I think you miss the point. Electric indent should never ever break the logic in the code. When electric indentation isn't 100% sure of what it is doing it is better if it isn't doing anything at all. |
@pacien I have an open PR that rewrites the readme, this is how I would write it: https://github.com/nim-lang/nim-mode/blob/ea6fad3be9b16773f3769581992b1208d3b4342e/README.md Maybe you get some valuable information from it. |
@krux02 I think he is mentioning indent-region. electric-indent is for manual indentation line by line. |
isn't electric indentation and indent-region besad on the exact same rules? |
@krux02 in pacien's example, it's clearly the problem comes from the variable I mentioned (I tested), not from electric indentation If you are talking about (when (and electric-indent-mode
(eq (char-before) last-command-event)) |
It's a nightmare to learn all the pitfall of automatic code breaking indentation changes in electric-indent-mode. You save every Nim developer who wants to use emacs a lot of trouble and time if you just delete without substitution |
maybe but it's off topic in this issue board |
Conforming Bugs
Please tell us below:
*Messages*
buffer? no(Comment out nimsuggest-mode's config please)
And describe your problem:
Original file: correctly indented manually
After
mark-whole-buffer
andindent-region
: indent is brokenThe text was updated successfully, but these errors were encountered: