[Well done :) ] Feature request : Code indentation


Samuel Vanneste

Hello,
This is not urgent, not important and more to know if it could be possible to have in a future version, an option to indent the code more nicely.

Probably, I am doing it wrong but I tested with "Auto indent" checked or not and, each time I finish a line, it doesn't seem to align with the previous one.

Here is a ScreenGif capture about what I mean

Of course, this has only impact on reading long codes but mine becomes quickly ugly if it is not idented (random sample below)

And it becomes more difficult with more than one indentation level.

If you could put it on your To-Do list for the future, David :)
Many thanks


decsoft

Hello Samuel,

Thanks for the suggestion. Certainly I think the main problem is the "actions insertion". For some reason (I try it of course) they are not perfect when the previous line as been indented, maybe in many levels. Certainly I can study it in a more deep way (when have some time!).

Maybe it's also something related with my own habits I supose: I normally never use the indentation feature in any editor nor IDE: I prefer to determine the indentation spaces by... spaces... and to control it manually by myself. So I really don't place too much attention on this.

It's ok Samuel, I will try to figure out how the actions' lines can be inserted in the code taking in consideration the possible indentation levels in the previous lines.



decsoft

Hello Samuel,

It's not perfect yet, however, I improve a little the indentation task and you can see it working on the current App Builder release. Why I say it's not perfect? Right now (with the latest changes) we don't loss anymore the indentation when edit actions, no matter the amount of indentation space.

However, when we insert a new action from the actions' dock window, I can't calculate (right now) the intentation in the proper way, so, even when the action is inserted in the right place (respecting the indentation) then a new line is also inserted and they do not start at the indentation point (of the above line) but at the start. So we must press the space key if we want to continue adding more actions from the actions' dock window.

Maybe I can improve this in the near future. Anyway I hope the introduced changes help us.

P.S. Something I forget to say. The "indentation option" of the code editor is not exactly related with the indentation than AB try to maintain when insert and edit visual actions. The code editor's indentation option means the editor respect the indentation of the previous line when we press the enter key, basically. So this option is not certainly useful when insert new actions and edit existing ones.



Samuel Vanneste

Hello David,
Thanks for the great improvement. If, not perfect as you said, in my opinion, it seems to perfectly reply to the need because there is some logic in the way the code is indented.
So the brain can get used to the way the code appears and can learn how to quickly find the information.

Again, thanks a lot for your great support David :)


decsoft

Hello Samuel,

Hello David,
Thanks for the great improvement. If, not perfect as you said, in my opinion, it seems to perfectly reply to the need because there is some logic in the way the code is indented.
So the brain can get used to the way the code appears and can learn how to quickly find the information.

Again, thanks a lot for your great support David :)

Always thanks you! Certainly the indentation is a task from us, in the sense that we are responsible about how the code finally looks. At least the recent changes do not break the indentation when edit action. The "autocompletion" list also respect the indentation. Even the new actions from the actions' dock window (a bit more problematic) works like expected... if we previously set the cursor on the right place. Certainly this is not perfect, but better than before. :)


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.