Skip to content
Ben S edited this page Dec 8, 2015 · 1 revision

![](screenshots/rustdoc preview.png)

Have you ever been writing some complicated Markdown in your Rust documentation, then found you had to run cargo doc just to check that the syntax was correct? No longer! Rust-BBEdit provides a Preview Filter that untangles code from doc comments so you can see how your Markdown looks without having to recompile.

With a Rust file open, open a new preview window with the Markup › Preview in BBEdit, which is bound by default to ⌃⌘P. From here, change the CSS to “Rust Documentation” and the Filter to “Rust Markdown”.

The preview window separates your file into blocks of code and rendered documentation. The code is de-emphasised, but is still there so you can find your way around the file. The preview window will update after a break in typing, or immediately on a save.

This feature is not intended as a replacement for rustdoc or cargo doc! It’s just a helper to use while developing.

Clone this wiki locally