Added Markdown support to wrap(1)

Paul J. Lucas paul at lucasmail.org
Fri May 6 10:32:46 EDT 2016


On May 6, 2016, at 5:25 AM, Sherwood Botsford <sgbotsford at gmail.com> wrote:

> He's made a plugin that reformats comments, and does The Right Thing with MD within comments.

And I presume it’s limited to emacs.  If I wanted to use it for some other editor, or as part of another pipeline, or as part of a source code repository commit hook, I probably couldn’t use the plugin.

> To me this is something that the text editor should do automatically. This, and it's ilk, such as wrap, par, etc. have to be run as an external command, piping out and in.

If you hadn’t seen some other editor, let’s call it, say, “iv” [sic] and I pre-configured it binding a certain key sequence to call an external command, and sat you down in front of it for you to use and didn’t tell you it used an external command, you wouldn’t know the difference.

You can’t be pointing out that it’s technically slightly less efficient because it has to spawn another process, I don’t think, because it’s all been completed by the time your fingers come completely off the keys.  It is a text editor, after all, that spends most of its time waiting for a human to press keys.  Efficiency at that level simply doesn’t matter.

If I had a Way-Back machine and release wrap with Markdown support before the emacs plugin, perhaps I could have commented, “If only people learned to write code the Unix way with pipes.”  Nah, I wouldn’t do that.  Why not?  Because, as I stated initially, I started wrap in 1996 (!) to scratch my particular itch as someone who enjoys coding for its own sake.  Perhaps Marty did something similar.

I announced wrap’s Markdown support on the list in case others might find it useful.  If so, great; if not, just keep using what you’re using.  There’s really no need for anything else.

- Paul


More information about the Markdown-Discuss mailing list