TextMate support for knitr
Perl Python
Switch branches/tags
Nothing to show
Pull request Compare This branch is 12 commits ahead, 6 commits behind textmate:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


TextMate Bundle for knitr noweb files


Put this bundle in your TextMate bundle directory:

# For Textmate 2:
mkdir -p ~/Library/Application\ Support/Avian/Bundles/
cd ~/Library/Application\ Support/Avian/Bundles/
git clone https://github.com/fonnesbeck/knitr.tmbundle.git


  • Knit, Typeset & View
    • This is the main command. It will knit the R noweb file (Rnw, rnw), produce the tex file, then the pdf file and finally open it in the viewer you specified (edit the command to choose your favorite viewer).
  • Knit in R
    • This command knits the file in R creating the tex file.
  • View (PDF)
    • This command opens the PDF in the specified viewer. It is useful if you are using the Knit in R command.
  • Insert R Code Chunk
    • Inserts an R code chunk into the file. The chunk will have no options defined.
  • Change Block Parameters
    • Changes the parameters of the R code chunk among a few options provided.
  • Fix Code Block Indent
    • As the name suggests, it fixes the indentation of an R code chunk.
  • Select Previous Code Block
    • Selects the previous code block in case that you then want to evaluate it in R using the R TextMate bundle.
  • setwd in R
    • Sets the current working directory in R using the setwd() R function.

For R markdown files (Rmd, rmd) you might be interested in the Redcarpet Markdown TextMate bundle which bridges GitHub flavored markdown and R code using knitrBootstrap or knitr.