bbedit

Run make in BBEdit on an .Rmd file


I have a document (an RMarkdown document) which I am editing in BBEdit. I am also using a makefile to compile the final document and also do some other things.

At the moment, I have a terminal window open in which I run make html, but this requires me to switch to the terminal window and back.

Is there (and I am sure there is - I am new to BBEdit and only scratching the surface) a way of running make html from within BbEdit, preferably using a "per folder or project defined" command?


Solution

  • I can think of a couple of ways you might accomplish this.

    1. Use a Shell Worksheet to run your make html command;

    2. Write a #! (bash, Python, ruby, whatever) script to do the work, and place it in BBEdit's Scripts folder. BBEdit sets the environment up for #! scripts (you can read more about this in the manual), so your script could figure out what the appropriate directory is in which to run the make html, based on the path to the active document.