zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
39.82k stars 2.08k forks source link

Clean-up text actions #4528

Open fuzenco opened 10 months ago

fuzenco commented 10 months ago

Check for existing issues

Describe the feature

I use a plain text editor for cleaning up body text that my clients provide. I’d love to see Zed add the following two runnable throughout an entire doc (or even possibly on selected text):

Thanks for listening :)

If applicable, add mockups / screenshots to help present your vision of the feature

No response

JosephTLyons commented 10 months ago

Hey @fuzenco, we currently have two settings in Zed that apply these actions on save. Do these work for you, or are you specifically asking for an action (bound to a key binding, or a accessible through the command palette) that can be manually triggered?

  "remove_trailing_whitespace_on_save": true,
  "ensure_final_newline_on_save": true,
fuzenco commented 10 months ago

Hey @fuzenco, we currently have two settings in Zed that apply these actions on save. Do these work for you, or are you asking for an actual action bound to a key binding that can be manually triggered?

  "remove_trailing_whitespace_on_save": true,
  "ensure_final_newline_on_save": true,

I was asking about a Command Palette manual trigger but having it in Settings automatically is good too for trailing spaces. Thank you.

But that command does't eliminate multiple spaces within strings of text (only at end of lines) which I understand could disrupt actual coding work. So I was asking more for general text editing use where doing a search and replace would be cumbersome. Hope that makes sense.