reddit / emacs

Stop Emacs messing with my whitespace

RedditAlready19 · 2022-06-10 20:46
Yes, I have reasons to mix spaces and tabs. Yes, I want lines with only whitespace. How do I make Emacs leave my whitespace alone?
Faerryn · 2022-06-10 21:14
EMACS should leave your whitespaces alone by default, no?
00-11 · 2022-06-10 22:14
https://en.wikipedia.org/wiki/Loaded_question (aka "When did you stop beating your wife?") Bisect your init file, to find where you're telling Emacs to mess with your whitespace.
7890yuiop · 2022-06-11 00:58
Stop asking it to mess with your whitespace. By default it doesn't, so you've configured it to do those things. If you don't know how you did that, you could recursively bisect your config to figure it out.
LemonBreezes · 2022-06-11 02:27
Are you using a package like `ws-butler` or `whitespace-mode`? Emacs does not clean up whitespace on save by default.
RedditAlready19 · 2022-06-11 06:37
It does it live, not on save
LemonBreezes · 2022-06-11 20:54
Which interactive commands modify your whitespace? (Ctrl-h k)
RedditAlready19 · 2022-06-11 20:56
Tab and LF
7890yuiop · 2022-06-15 00:49
It sounds like you want to inhibit indentation behaviours, so you can try these (almost certain to be insufficient for all cases, but probably covers many): > Tab (global-set-key (kbd "TAB") #'self-insert-command) > LF (electric-indent-mode 0)