Almost every text editor is able to truncate lines by default, but in Emacs I'm still using the cumbersome M-x toggle-truncate-lines
in every buffer with long lines. Unfortunately, buffers with long lines are very common, so one has to do M-x toggle-truncate-lines
constantly.
Solutions currently posted on StackOverflow do not work (e.g., link):
(setq-default truncate-lines t)
ininit.el
does not have any effect.(custom-set-variables '(truncate-lines t))
ininit.el
does not have any effect.(global-set-key "\C-x\ w" 'toggle-truncate-lines)
does not really solve the problem.
I must be overlooking something here; what's the actual setting for truncating long lines by default?