Tapatalk

Wordfile for Markdown

Wordfile for Markdown

4
NewbieNewbie
4

PostJan 13, 2025#1

Hello,
i'm looking for a way to configure a proper (± complete ) wordfile for Markdown.
Highlignting seems operating for Markdown, but very uncomplete.
The wordfile is very small : 13 lines (in C:\Users\pyd\AppData\Roaming\IDMComp\UltraEdit\wordfiles\markdown.uew )


I'm failing to find any wordfiles on UE resources and UE forums. Forum pages on this issue are often very old.
This is very contradictory with the communication given on UE featuring webpages.
Could some one help?
PY D

6,826625
Grand MasterGrand Master
6,826625

PostJan 14, 2025#2

Most of the Markdown highlighting is built-in which is the reason for pre-installed wordfile is very small. I suppose that you have not configured in the Manage Themes dialog window the syntax highlighting for language Markdown to your needs.

You should explain with an example Markdown file and with screenshots in PNG or WEBP format what you miss on syntax highlighting of Markdown files. You should add also the UltraEdit theme file used by you.

4
NewbieNewbie
4

PostJan 14, 2025#3

Thanks, Mofi,

Themes :
I hadn't indeed configured Themes/Syntax/Markdown, so that many formattings were not enhanced. OK about this.

markdown.uew :
Just to understand the role of this so small file: why so short? does it refer to more UE internal files?
( I noticed in UE that Html and Python wordfiles are resp 190 and 290 lines long .... )

TagList :

I was hoping to be able to click & pick MD markers, such as "***", or others , less evident, in a UE sidebar taglist, just as it is for Html , Python and other main languages.
Is this possible? Would that mean adding another wordfile, which would conflict with markdown.uew?
Why does it seem that nobody did build such a ± complete taglist?
( I understand well that MD's purpose  precisely is to avoid need to heavy syntax, but the MD standard is very complete: one can't remember everything by head ...

Thanks on forward

6,826625
Grand MasterGrand Master
6,826625

PostJan 14, 2025#4

The syntax highlighting engine of UltraEdit is mainly based on words. That cannot be used for Markdown syntax highlighting. The Markdown syntax uses sequences of ASCII characters not being word characters (according to Unicode specification) to define the formatting of the text. That is the reason – most likely as I am just a user like you and do not know the code of UltraEdit – for special Markdown parsing code in program code of UE/UES to detect the character sequences which should be interpreted as Markdown formatting tags. I know from several false positives detected by myself as every Markdown parser has and issues like a large preformatted text marked with ``` beginning at byte offset X and ending thousands of lines (many KiB) below with one more line with ```. (The solution for this issue is using four indent spaces on each line of the preformatted text instead of  ``` at top and bottom of the preformatted text block.)

Another issue is that UltraEdit is a text editor and not a word processor like Microsoft Word or LibreOffice Writer. UltraEdit is for editing plain text files and not documents with text and hidden formatting tags. Showing the text with Markdown formatting tags applied in the edit window of the active file is therefore limited to what UltraEdit supports natively for syntax highlighting text files. There can be color groups used to define displayed text with different colors and also with different font styles like bold or italic. But it is not possible to display the text in a table form or as lists even on the Markdown formatting tags define that the text should be finally displayed in a table or in a list. There is the Live preview (horizontal or vertical) and the Browser view to get displayed in an additional window the text with formatting applied. UltraEdit runs in this case internally a Markdown parser producing an HTML file which is temporarily created (and updated on each edit of the file) which is displayed with a browser (Internet Explorer on older Windows, Edge Chromium on newer Windows) inside the window of UltraEdit.

The syntax highlighting wordfile markdown.uew is mainly an interface between the built-in syntax highlighting parser for text files with Markdown tags and the user interface as used for all other syntax highlighting languages. The definitions in the wordfile make it possible that a user customizes the look of the predefined "color groups" (in real formatting groups)  in the Manage Themes dialog according to the used theme. Font style bold defined for the second "color group" with name Bold results in getting the text between two ** or two __ displayed bold in text editing area (in most cases).

It is not possible adding color groups to markdown.uew with words and get those words syntax highlighted. The syntax highlighting parser usually used for opened files defined by the settings and words in the wordfiles is not used for parsing text files with Markdown formatting tags. There is always used the integrated Markdown parser and the user can only configure the colors and font styles for the "color groups" as defined by the internal Markdown parser. Words in the wordfile markdown.uew in the existing or additional color groups are completely ignored for syntax highlighting.

The main goal of Markdown is writing text in a text editor or a text editing field in a web browser quickly with basic formatting tags later used on displaying the text or on creation of a document (in HTML, RTF, PDF, LaTeX etc.) without the need to execute commands on a toolbar for applying formatting or inserting formatting tags or entering complex formatting tag structures. This goal is achieved with Markdown whereby I must add that I write HTML files in UltraEdit as fast as Markdown files. The difference is only that I have much more possibilities to format text in an HTML file than in a Markdown file. But for not too difficult to format documentations is used nowadays by me nevertheless Markdown. HTML is still used by me on complex documentations like on using tables with full control on alignment using additionally CSS as one of multiple examples when I prefer HTML over Markdown.

The tag list file %APPDATA%\IDMComp\UltraEdit\TagListU.txt as installed with UltraEdit does not contain a tag group for inserting Markdown formatting tags. It is of course possible to add such a tag group. Right click into the Tag List view and click on the context menu item Modify for opening the Tag List Modify dialog window. There can be defined a New group for Markdown and added the Markdown tags.

But it looks like you mix up the tag list feature with the smart templates feature. There are no syntax highlighting language based smart templates preconfigured for the syntax highlighting language Markdown. But open the Template List view, right click into this view and click on the context menu item Modify templates for opening the Modify Templates dialog window. Select for Template group the syntax highlighting Language Markdown and click on button with + symbol to add the first template. Enter a template name and the content and a description. The Do not insert in options Comments and Strings can be ignored for Markdown templates. Click on button Help for opening the help page Modify templates command (Edit tab/Insert template dropdown) which describes the syntax to use and the possibilities offered on creation and usage of smart templates.

It does not make much sense to define Markdown templates (or tags) to insert ** or __ (bold) or * (italic) although it could be useful on selecting a text and insert these tags around the selected text. That is possible with smart language templates and also with tags. But the text writing is done wrong on writing first the text, then selecting the text with pointing device (or keyboard) and inserting a smart template or a tag from a list (with pointing device or with keyboard) to insert the Markdown tags around the selected text. That would be very inefficient. Such writing is used only by people with no knowledge how to apply formatting tags with keyboard while typing the text. It is also in Microsoft Word much faster writing text, pressing Ctrl+B to enable bold, continue writing text being now formatted bold, press Ctrl+B again to disable bold, and continue writing text. The same should be done for simple formatting in Markdown or HTML formatted text.

Smart templates are useful for Markdown text writing on often inserting complex structures like various often needed tables with a fixed number of rows and columns or certain nested list structures (directory tree listings). In such use cases creating smart templates with good names for quickly typing them and next inserting the matching template on being suggested by UltraEdit could be a big time safer. Although it is possible inserting a tag spanning over multiple lines, it is more efficient to use smart language templates for inserting a multi-line block with Markdown tags into which the text should be inserted between the formatting characters.

PS: The default tag list file %APPDATA%\IDMComp\UltraEdit\TagListU.txt contains tag groups which I have defined in the past and which I have sent to support of UltraEdit usually during a beta testing for being used in the installed tag list file, with the exception of the COLD FUSION tag group. I use in my custom tag list file more tag groups. I use also smart templates for various languages (and some global templates). I have never sent my smart templates to UltraEdit support as the smart templates are written for me, the syntax used by me in my files, and with names I am familiar with after years of usage. Many names of my smart templates would be very confusing for beginners like fdf or fdsf (smart batch language template for inserting a FOR /F loop processing a list of file names in a directory created by DIR filtered additionally with FINDSTR or the same for a directory and all its subdirectories).

4
NewbieNewbie
4

PostJan 14, 2025#5

Thanks a lot for this very complete answer.
I'm digging into ....
🙏👍

PostJan 15, 2025#6

OK.
:-)
I read through.
I got the whole stuff.
You helped me in a very complete and effective way.
Thanks