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
Hard wrap and pipe to external command
-
- Posts: 2308
- Joined: 25.08.2021 18:15
Plugin CudaExt has the command for this. in the Command Palette:if it is possible to hard wrap text around a defined margin.
plugin: Cuda-Ext: Align: Re-wrap/split lines by margin.
It does the work on every call, not during the typing.
Plugin External Tools supports this for its tools. In the 'Tools properties" dialog (in the Tools top menu item), press "Add", find macro: {SelectedText}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)?
https://wiki.freepascal.org/CudaText_pl ... rnal_Tools
Plugin Runner maybe supports this too,
https://wiki.freepascal.org/CudaText_plugins#Runner