2

I would like to run par or fmt to format my .md file. In vim this would be %!fmt (for the whole buffer) or 13,16!fmt (for line 13 - line 16). What's the "emacs way" to achieve something like this

PS: I am aware of evil-mode(If I wanted vi keystrokes, I would have used vim) and the M-! key binding. I also am quite new to emacs

5
  1. Create a region (for example via C-SPC or M-h, see "Mark" in Emacs' manual: C-h r m Mark RET)
  2. Use shell-command-on-region with a prefix argument: C-u M-|

You can find more information in the Emacs documentation via C-h F shell-command-on-region RET.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.