3

Is it possible to hide the part of long lines that exceeds the visual line rather than wrapping it into further visual lines?

7

C-hig (emacs)Line Truncation

As an alternative to continuation (*note Continuation Lines::), Emacs can display long lines by “truncation”. This means that all the characters that do not fit in the width of the screen or window do not appear at all. On graphical displays, a small straight arrow in the fringe indicates truncation at either end of the line. On text terminals, this is indicated with $ signs in the rightmost and/or leftmost columns.

Horizontal scrolling automatically causes line truncation (*note Horizontal Scrolling::). You can explicitly enable line truncation for a particular buffer with the command M-x toggle-truncate-lines. This works by locally changing the variable truncate-lines. If that variable is non-nil, long lines are truncated; if it is nil, they are continued onto multiple screen lines. Setting the variable truncate-lines in any way makes it local to the current buffer; until that time, the default value, which is normally nil, is in effect.

If a split window becomes too narrow, Emacs may automatically enable line truncation. *Note Split Window::, for the variable truncate-partial-width-windows which controls this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.