2 ms·
You can write an interactive function that runs fill-paragraph (or whatever M-q is bound to in the mode you are using), then deletes multiple spaces (something
by sedachv 10y ago
You can write an interactive function that runs fill-paragraph (or whatever M-q is bound to in the mode you are using), then deletes multiple spaces (something like http://stackoverflow.com/questions/8674912/how-to-collapse-whitespaces-in-a-region http://stackoverflow.com/questions/8674912/how-to-collapse-w...).
That would not be a good default because some people, like me, like to align their code in columns (for example, things like let clauses).
What I would like to see come as an Emacs default is just-one-space working on regions with the behavior you describe.
- kruhft 10y agoWhat I've noticed after using paredit is that I'm doing a lot less paren matching (well none) and a lot more white space clean up, so I think such a function would be very useful to run as a hook on insert char. Since the program is always syntactically correct, it might almost work... And @sedachv, thanks for Parenscript. It makes Javascript almost...well, now I can work it it :) Much appreciated.