Use the function list menu with Notepad++ with markdown

14 April 2020

I always wanted to have a way to go rapidly through the structure of long markdown files in Notepad++. Because this is a great little, simple, fast software. Exactly just what you need without being fancy when you need to do simple things.

I found a post in the forum of Notepad++ that to be able to do this using the Functioin List.

Several issue were also opened on Github where I replied :

I copy my post here:

I could make it work for me with helped of post in the Forum of Notepad++.

You have to modify your functionList.xml:

  • associationMap part
    • it is important that your userDefinedLangName fit to the language used when your open your extension
  • parser part
    • I modifiied the main expression in order to have before the # tag possibility to have 1 or several tabs (|\t{1,5}), because this is my way to structure my markdown file for lisibility : "(?x)((?:^|\n|\t{1,5})[#]+\s+(.*?)(\r*|\n*)$)"

Here what I mean regarding the tabs in my files Picture2 Picture2

	<association id=    "markdown_header"        userDefinedLangName="Md Drakula"           />
	<association id=    "markdown_header"        ext=".md"                                />
	<!-- ======================================================== [ Markdown ] -->
	<!-- Based on code modified from -->
		displayName="Md Drakula" 

Here the result:


If someone knows how to use the functionName (example below) to replace the \t with space in order that the hierarchy is more lisible in the function list it would be great.

                        <nameExpr expr="(?:[#]+\s+)(.*)"/>


    Join the discussion for this article on this ticket. Comments appear on this page instantly.
    Thanks to aristaht for making this static comment system possible.