To lower the barriers for SynWrite beginners, this document is deliberately kept simple.
Lexer
I tried from scratch a new lexer. In some cases I reused code from Alexey and Matthias.
The existing standard lexer had sometimes weird “wait states”, while writing. As far as I can say after a several days testing, my first attempt creating a lexer works fine for me in most circumstances.
- To make it happen, you have to import the lexer to your environment.
- To activate spell check in the whole Markdown text, you have to modify lexer.cfg (program root directory). Delete all entries for markdown. I added a sample
Lexer-nosi.cfg
for comparison or simply rename it. lexer.cfg
will be overwritten by updates! Create a backup!- This works for “German”. Other languages may behave different (not tested)
Comments welcome, please post in SynWrite-forum.
Snippets
I created a few snippets supporting my daily work. In some, I prepared a currently not supported feature (footnote, reference) for inserting elements in more than one place. I don´t know, if / when this feature will be supported. Currently it may be useful, to modify to the standard behavior (no replacing, jump to instead).
In others I used adjustments to fulfill requirements of pandoc formatting (see Pandoc Support).
Maybe these are useful for others, too.
Thanks to Alexey for his incredible work.
NoSi
Pandoc Support HTML-Export
I modified Alexeys Batch to my requirements:
- I want to have “standalone” HTML files1
- The generated file shall reside in the same location as creation markdown file.
- Portable on stick.
- “My Style” css.
Conditions
- In
{SynDir}
resides a subdirPandoc
. In this dir all pandoc related data is stored. This is 1. Pandoc.exe- md2html.bat (the batch)
- style.css (the used style sheet)
- subdir
templates
with “my” template files for pandoc.
Configuration
Tools - Customize External Tools has an entry MD2HTML with following properties:
- Name
HD2HTML
- File Name
{SynDir}/pandoc/md2html.bat
- Parameters
“{FileName}” “{SynDir}/pandoc/”
- Initial Folder
{SynDir}/pandoc/
- Lexer
Markdown
- Save before
Current Document
This file can simply be modified to other output formats. See Pandoc guide for details.
Snippets Notes
Some snippets are a little bit special and possibly need some explanation.
- Pico Header
Pico is a flat file CMS using markdown files. This is a header entry for blogging files.
- Pandoc Header
Creates a standard header entry for markdown files, that shall be processed by pandoc.
- CSS lightbox
Required codeblock for creating a css-only lightbox for images. The lightbox css is based on a solution of Gregory Shier. The added style sheet requires the apropriate additions described there.
Finally
I have tested the lexer and the snippets carefully. However, I can not guarantee that they function as expected under all circumstances. For error messages I am grateful (Please send your feedback to the forum).
Batch file offers some different, documented options.↩