Hacker News new | past | comments | ask | show | jobs | submit login

This is part of the reason why editors for programmers and editors for general text editing are not the right thing.

I have F11 in emacs bound to whitespace-cleanup, which takes care of it all for me. And supertabs mode in general works just the way it should with tabs-indent/spaces-align.

Then there's also clang-fmt, possibley used as a post-receive hook in git (and some other VCS) which makes irrelevant what the programmer's editor did, mostly.




Can whitespace-cleanup really differentiate between places where you want a tab for indentation, and places where you want spaces for alignment, where the number of spaces may be greater than the tab width? After all, the only way to differentiate is to guess what you might be trying to align to by looking at surrounding lines… but from a quick search, whitespace.el looks less complex than that.


You're entirely correct. Sorry, i forget, whitespace-cleanup is there so that I can remove dangling whitespace from the end of lines.

supertab mode is the tab-to-indent/space-to-align magic.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: