Benature/obsidian-text-format

Feature request: Trim trailing spaces

goncharovdk opened this issue · 4 comments

Please add the possibility of removing trailing spaces from lines. (This is not the same as "Remove all spaces" or "Remove redundant spaces".) Many users are asking for this feature, see e.g. https://forum.obsidian.md/t/trim-trailing-whitespace/17047

v2.6.0 has supportted this feature, please have a try!

Free feel to reopen this issue if something is wrong.

As this feature is quite simple, it will be moved to "Custom replacement" (#77) after v3.0.0. The user who has similar demands can refer to this setting. Any other use cases are welcome to share!

image
  • name: Remove trailing spaces
  • search: (\s*)(?=\n)|(\s*)$
  • replace: ``

Found a GUI issue: when a new empty custom replacement is added with [+] button, the "Custom replacement [v]" immediately collapses into "Custom replacement [^]" and visually disappears.

Found a GUI issue: when a new empty custom replacement is added with [+] button, the "Custom replacement [v]" immediately collapses into "Custom replacement [^]" and visually disappears.

Yes. This is fixed in the beta version and will be also in the next official release version.