In my emacs html-mode word wrapping happens if cross the legendary limit of 80 columns. How can I disable it?
If you want to prevent the text from wrapping, you can apply white-space: nowrap; Notice in HTML code example at the top of this article, there are actually two line breaks, one before the line of text and one after, which allow the text to be on its own line (in the code).
Alt + X , toggle-truncate-lines (tab completion works) will turn word wrapping off for the current document.
Enable or disable text wrapping for a text box, rich text box, or expression box. Right-click the control for which you want to enable or disable text wrapping, and then click Control Properties on the shortcut menu. Click the Display tab. Select or clear the Wrap text check box.
Sometimes, a line of text in the buffer—a logical line—is too long to fit in the window, and Emacs displays it as two or more screen lines. This is called line wrapping or continuation, and the long logical line is called a continued line.
Word-wrapping in Emacs is done using the minor mode auto-fill-mode
. You can disable it by running the command M-x auto-fill-mode RET
, or by adding it to a hook:
(defun my-html-mode-hook ()
(auto-fill-mode -1))
(add-hook 'html-mode-hook 'my-html-mode-hook)
Add this to your .emacs:
(defun my-html-mode-setup ()
(auto-fill-mode -1))
(add-hook 'html-mode-hook 'my-html-mode-setup)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With