help-nano
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem using formatter


From: Robert Goulding
Subject: Re: Problem using formatter
Date: Sat, 23 Jul 2022 10:59:04 -0400

And I'm guessing this is because pandoc sends the converted text to stdout. But according to the nanorc manpage, the formatter command sends the buffer to a temporary file, executes the command on the file, and then replaces the buffer with the modified file. But of course pandoc does not alter the file. It could be told to, with the output file option (-o) -- but how would I do that?

On Sat, Jul 23, 2022 at 10:28 AM Robert Goulding <Robert.D.Goulding.2@nd.edu> wrote:
Using nano 6.3 on Debian bullseye.

I am trying to use pandoc to tidy up and reformat markdown files. So, I have the following two lines at the top of my markdown.nanorc file:

syntax "Markdown" "\.(md|mkd|mkdn|markdown)$"
formatter pandoc --wrap=none -t markdown-simple_tables-pipe_tables-multiline_tables

When I hit M-F, the screen flashes, but the content of the buffer is not changed. However, when I quit nano, the properly formatted buffer is visible in the terminal.

Attached is a sample file, and what my terminal looks like after I quit nano.

Robert.

--
Robert Goulding
Director, John J. Reilly Center for Science, Technology, and Values;
Director, Program in History and Philosophy of Science;
Assoc. Professor, Program of Liberal Studies,
Fellow, Medieval Institute,
University of Notre Dame.


--
Robert Goulding
Director, John J. Reilly Center for Science, Technology, and Values;
Director, Program in History and Philosophy of Science;
Assoc. Professor, Program of Liberal Studies,
Fellow, Medieval Institute,
University of Notre Dame.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]