Hard wrap and pipe to external command
Posted: 22.11.2021 10:07
Hi again,
there is the 'word-wrap mode' which can also use a margin for wrapping text. However, this is a soft wrap. I am wondering if it is possible to hard wrap text around a defined margin. With hard wrapping I mean that the editor will insert newlines. In other editors, such a functionality is often built in or delegated to an (external) formatter command. By the way, can I pass a selection to an external command as filter (e.g. pipe a text to stdin of the `fmt` command and insert its stdout)?
Kind regards,
—Martin
there is the 'word-wrap mode' which can also use a margin for wrapping text. However, this is a soft wrap. I am wondering if it is possible to hard wrap text around a defined margin. With hard wrapping I mean that the editor will insert newlines. In other editors, such a functionality is often built in or delegated to an (external) formatter command. By the way, can I pass a selection to an external command as filter (e.g. pipe a text to stdin of the `fmt` command and insert its stdout)?
Kind regards,
—Martin