You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For code readability it is common to skip a line every now and then (between functions, variable declarations and so on). May be it is nice to have an option in Line operations to leave those lines.
Easiest way to do this would be to provide a new option which does exactly the same as "Remove empty lines" with the following exception. If there are "n" blank lines together, only delete "n-1" of them.
The text was updated successfully, but these errors were encountered:
I think that adding a "Remove n-1 empty lines" to LineOperations is great idea.
However, there are some concerns:
Implementing this function should be simple enough, but I feel like this kind of plugin can quickly get out of hand with unused functions. Are there enough people who would use this function?
This is stepping over the line into the land of 'code styling'.
This plugin is not really intended to format code (that stuff gets crazy real quick)
If you are looking for a quickly solution try this:
In find and replace (ctrl-h)
check: "Use regular expressions", "Use multi-line matching", "Case sensitive"
Search for: "\n{3,}" (or "(\r\n){3,}" in windows)
Replace with: "\n\n" (or "\r\n\r\n" in windows)
If you are looking for a more complex solution try AStyle.
If you can convince me that my concerns above are not a problem, then I would be more than happy to add this function. Please let me know what you think after reading this.
I agree. I raised this issue before I knew about AStyle or ClangFormat. I also came across this plugin for Geany. So, if Geany devs think that this is an unnecessary function, please feel free to close this issue.
For code readability it is common to skip a line every now and then (between functions, variable declarations and so on). May be it is nice to have an option in Line operations to leave those lines.
Easiest way to do this would be to provide a new option which does exactly the same as "Remove empty lines" with the following exception. If there are "n" blank lines together, only delete "n-1" of them.
The text was updated successfully, but these errors were encountered: