I'm quite new to emacs (coming from vim), and I'm struggling to figure out how to configure sane line-wrapping/truncation behavior.
For the most part, I'd like to prevent wrapping, so I put this in my init file:
(setq-default truncate-lines t)
But for help/info buffers, I do want wrapping.
Basically, I want truncation in buffers that contain code, and wrapping in buffers that contain text. What's a sensible way to achieve this? I imagine I want to keep the above default, but override it for certain major modes (e.g. Help), but I'm not sure how to do that.
update based on Kaushal Modi's answer
(defun my-truncate-lines-disable () (setq truncate-lines nil)) (add-hook 'help-mode-hook #'my-truncate-lines-disable)