Enhancement suggestion for the LibreOffice IDE is to automatically remove any tailing whitespaces (eg spaces, tabs) at the end of each line.
Thanks for splitting all up, Óvári! Setting to new..
It need to decide when spaces and tabs have to be deleted during a work macros or saving it. Also, it requires setting, because there are people who do not like it. So, dev have to create tab BasicIDE in Tool -> Options.
We could have an option in the Edit menu named "Remove all trailing spaces". When the user clicks this command, it will remove all trailing spaces in the currently open module. This way, we wouldn't need to create a new setting.
Calc nows the function TRIM() to remove trailing spaces. And probably some IDE too but in general it's not a common function. And not urgently needed. I'd prefer to realize this special request per extension/macro.
(In reply to Heiko Tietze from comment #4) > Calc nows the function TRIM() to remove trailing spaces. And probably some > IDE too but in general it's not a common function. And not urgently needed. > > I'd prefer to realize this special request per extension/macro. LibO Basic has this function, too, as well as LTRIM and RTRIM. But this handles string variables. In contrast, the request is, as far as I understand, to remove trailing blanks in the Basic Code, shown in the IDE. I do not see much use in this feature, as the blanks do no harm.
(In reply to Gerhard Weydt from comment #5) > LibO Basic has this function, too, as well as LTRIM and RTRIM. But this And Trim functions also remove leading spaces ;) > handles string variables. In contrast, the request is, as far as I > understand, to remove trailing blanks in the Basic Code, shown in the IDE. Yep. > I do not see much use in this feature, as the blanks do no harm. This is one part of all suggestions done in/for 92251 by ÓVári. Just makes sense to have that for macro coders. And comment 3 gives a nice direction IMO.
(In reply to Heiko Tietze from comment #4) > Calc nows the function TRIM() to remove trailing spaces. And probably some > IDE too but in general it's not a common function. I think it's fairly common as a voluntary or on-save action at least. Examples: https://stackoverflow.com/questions/20679842/remove-trailing-whitespace-on-save-in-intellij-idea-12 https://stackoverflow.com/q/82971/1593077 https://stackoverflow.com/q/1043433/1593077 but I have no opinion about this bug. One might wonder... does it make sense for LO to maintain its own IDE, striving for a full set of IDE features? Or should it better delegate work to a separate IDE, which is likely to offer more code-editing-specific features than LO itself?
(In reply to Eyal Rozenberg from comment #7) > Examples: VC and Eclipse per extension/addon...
In Kate it is a built-in feature: https://kate-editor.org/2012/10/27/remove-trailing-spaces/ In PyCharm it is a built-in feature as well... every time you save the file it removes the trailing spaces.
We discussed the topic in the design meeting. While there is no harm in trailing spaces the same is true for the function to remove it. And it seems the majority welcomes such a "beautifier" feature (intentionally naming it for a broader scope with the idea of proper indentation, for example). Automatically changing the code sounds a bit dirty even when we have an option. So perhaps a command to run the function is the better choice.
(In reply to Heiko Tietze from comment #10) > "beautifier" feature Perhaps it is also part of what is known as "Lint Tools" or "Code Linting"? > So perhaps a command to run the function is the better choice. It would be better to remove the spaces at the end of a line when a line loses focus.