-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Auto indentation behavior #8552
Comments
hi @cesarmansur , |
Hi @uslss Now, if I press ENTER, the editor will automatically indent the new line. So far so good. But, If I remove all the spaces from the new line and press ENTER, it will insist on putting spaces on the new lines. This is not desirable, as per I deliberately removed the spaces because I don't want them. It should follow the indentation from my previous empty line, that is none. And even if I insert many empty lines, everytime I press ENTER it will insist in put spaces on my new line. This is very annoying. My feature request is to have the automatic indentation disabled after the user inserted an empty and not indented new line. This is the default behavior on other editors. It should just follow the indentation from the previous line. If the previous line is empty and not indented, no indentation on the new line. Only if the previous line is indented, so make the editor auto indent the new line. |
@cesarmansur thanks a lot for clarification and suggestion |
hi, any update here? having the same issue... e.g. have a look at the following example:
if i want to add a new line before
so far so good.
results in
|
Same issue. Any chance of a fix? |
Also having same issue, any fix or workaround? |
Same issue, looking forward for a fix ... |
This forced indentation is so annoying. Incredible auto indent on/off is not available, it's such a small technical thing with a huge user impact. |
Ended up here when looking for how to disable the auto indenting. Apparently there is no such setting (odd since DBeaver has about a thousand settings :)). Please add this possibility. It is annoying to have to keep removing undesired added spaces when inserting a new line in the middle of a list or something else placed in the editor. Not all text placed there is pure SQL (for which I would still like to be able to get rid of the auto indenting), but meta text as well for the stuff you are working with at the moment. |
Did a quick search and the auto indent logic is most likely in SQLAutoIndentStrategy.java. Mark for myself to read the code later to see if it's possible to make a PR out of it. As of the fixing approach, I don't think an extra preference option is needed, just follow the indent from the previous line, even if it is an empty line. |
The problem with the auto indentation on new lines is that it aligns with the start position of the last line of code and adding empty lines in between does not change this behavior. Should adding an empty line reset the start position? |
Hello.
I'd like to have an option to disable auto indentation after inserting empty lines. This is the default behavior in Notepad++, for example. But I think it could be configurable in DBeaver.
The text was updated successfully, but these errors were encountered: