Format indentation should remove blank space on end of lines
Format indentation should remove blank space on end of lines
It would be nice to see that the menu command "Edit => Format indentation" would also remove spaces at the end of each line of code.
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
-
- Addict
- Posts: 1309
- Joined: Fri Aug 28, 2015 6:10 pm
- Location: Portugal
Re: Format indentation should remove blank space on end of l
+1
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Re: Format indentation should remove blank space on end of l
I've found that quirk to be quite annoying ... I agree. Although in my opinion it ranks
low on the list , below actual bug fixes.
low on the list , below actual bug fixes.
Re: Format indentation should remove blank space on end of l
if you consider macros then spaces at the end of a line might not always be outside of a string (note the spaces in a()):
spaces at the beginning of the macro body are already ignored as indentation though (don't know right now if only for the first line).
Code: Select all
Macro a()
"x
EndMacro
Macro b()
x"
EndMacro
s.s = a() b()
Debug s
Re: Format indentation should remove blank space on end of l
I agree with the above: this would break macros that rely on spaces. So, I vote no.
Re: Format indentation should remove blank space on end of l
maybe just don't apply the fix to lines within macros?
i like the suggestion - i dont know why but the PB IDE seems to add a lot of extra spaces after some lines for no reason (somewhat intermittently), which frustrates me a lot when im trying to quickly navigate to the end of a line (often) and have to waste time clicking over useless spaces i never added in the first place
i like the suggestion - i dont know why but the PB IDE seems to add a lot of extra spaces after some lines for no reason (somewhat intermittently), which frustrates me a lot when im trying to quickly navigate to the end of a line (often) and have to waste time clicking over useless spaces i never added in the first place
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Format indentation should remove blank space on end of l
Instead of "Edit => Format indentation" additionally removing spaces at the end of lines, let's have a separate command for that task.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Format indentation should remove blank space on end of l
@#Null:
Is such code often in use?
There are certainly many programmers here who also use other text editors besides the PB-IDE. Some of them have possibly defaulted settings that remove trailing spaces.
Or replace the menu item with "Reformat code". You can then specify in the preferences what the menu item should do (adjust indentation, remove trailing spaces, etc.).
Is such code often in use?
There are certainly many programmers here who also use other text editors besides the PB-IDE. Some of them have possibly defaulted settings that remove trailing spaces.
That's okay for me, too.IdeasVacuum wrote:Instead of "Edit => Format indentation" additionally removing spaces at the end of lines, let's have a separate command for that task.
Or replace the menu item with "Reformat code". You can then specify in the preferences what the menu item should do (adjust indentation, remove trailing spaces, etc.).
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
Re: Format indentation should remove blank space on end of l
I don't think so, I've never seen or used it. But that the behavior of the program might change by such a modification is something that should be considered. It can also be avoided by usingSicro wrote:@#Null:
Is such code often in use?
Code: Select all
Macro a()
"x "+"
EndMacro
Re: Format indentation should remove blank space on end of l
Yes, that's why I think the suggestion of @Keya to leave the trailing spaces/tabs within macro blocks untouched is a good compromise.#NULL wrote:But that the behavior of the program might change by such a modification is something that should be considered.
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version