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:

  1. I want to have “standalone” HTML files1
  2. The generated file shall reside in the same location as creation markdown file.
  3. Portable on stick.
  4. “My Style” css.

Conditions

  1. In {SynDir} resides a subdir Pandoc. In this dir all pandoc related data is stored. This is 1. Pandoc.exe
    1. md2html.bat (the batch)
    2. style.css (the used style sheet)
    3. subdir templates with “my” template files for pandoc.

Configuration

Screenshot Tools Settings Screenshot Tools Settings

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).


  1. Batch file offers some different, documented options.