Is there a way to make regions in terms of modes of respect for line wrapping?

When using a derived mode term(for example, ansi-termor multi-term), I often want to select a region and copy it somewhere else. If this region includes a line that is wrapped at the edge of the terminal window, pasting this region into another buffer always inserts a hard new line at the place where the termline is wrapped. This means that I often have to go back and clear the inserted text. Is there any way to avoid this? I have tried both term-line-mode, and term-char-mode; both do the same thing.

I do not want to write a yank hook that removes all newline characters, since I want to keep the existing hard newline characters in the original content.

+4
source share
1 answer

This works for me:

(setq term-suppress-hard-newline t)
+2
source

Source: https://habr.com/ru/post/1546734/


All Articles