FandocViewerUser Guide
Overview
FandocViewer automatically extends the capabilities of flux to show Fandoc documentation. It adds a fandoc
uri scheme allowing you to navigate and view all the Fantom pod documentation and source code in your current Fantom installation. Fantom docs offline!
Try these command lines:
> flux fandoc://docLang > flux fandoc://sys > flux fandoc://afFandocViewer/ > flux fandoc://fandoc/HtmlDocWriter
Wow! It looks just like the Fantom website! And all your pods are there too! The scheme follows the format:
fandoc://${podName}/${typeName}
It works by adding a web browser view to flux. That means you can also do this:
> flux http://www.alienfactory.co.uk/
See Browser for instructions on binding F5 to the refresh
command.
View .fandoc Files
You can also view standard files as rendered Fandoc documents. Not only is this great for previewing SideWalk comments and Fantom documentation, but you can also save and view notes locally as plain text .fandoc
files!
To enable this feature, edit %FAN_HOME%/etc/sys/ext2mime.props
and change the line:
fandoc=text/text; charset=utf-8
to
fandoc=text/fandoc; charset=utf-8
The ViewFandoc tool command allows you flip between editing and browsing with a single key press!
Fandoc Syntax Highlighting
To enable some fandoc syntax highlighting in your flux editor, edit %FAN_HOME%/etc/syntax/ext.props
and add the following line:
fandoc=fandoc
Then create a new file %FAN_HOME%/etc/syntax/syntax-fandoc.fog
with the following contents:
using syntax SyntaxRules { brackets = "[]" comments = [" ", "##", "**", "==", "--"] blockCommentStart = "pre>" blockCommentEnd = "<pre" blockCommentsNest = false strs = [ SyntaxStr { delimiter = "`"; multiLine = true }, ] keywords = null }
Associate flux with the .fandoc extension for easy editing!
Happy Fandoc editing!