Skip to content

Markdown syntax highlighting for Notepad++, by customized UDL (user defined language) file

License

Notifications You must be signed in to change notification settings

Panometric/markdown-plus-plus

 
 

Repository files navigation

Markdown Syntax Highlighting for Notepad++

Important Notice:

This URL of this repo is renamed! If you had forked this repo to your local machine, please update the remote:

# Check if my name exists
git remote -v
# e.g. origin https://github.com/Edditoria/markdown_npp_zenburn
# If yes, please do: (replace origin if need, e.g. upstream)
git remote set-url origin https://github.com/Edditoria/markdown-plus-plus.git
# Check if it is correct
git remote -v

If you had shared this repo in social networks and web, please kindly update the URL to:

https://github.com/Edditoria/markdown-plus-plus

Thanks!

Default or Zenburn, your choice! :)

By default, Notepad++ doesn't provide syntax highlighting for Markdown.
I use Markdown everyday, and I'm using a dark theme called Zenburn.
So, I make one for myself, and share to the world.

If you are a Notepad++ and Markdown user, you may like it!

Screenshot

Your Taste!
Markdown in Default Theme of Notepad++ Markdown in Zenburn Theme of Notepad++
Default Zenburn
Markdown in Blackboard Theme of Notepad++ Markdown in Deep Black Theme of Notepad++
Blackboard Deep Black

Supports file extensions: .markdown and .md
Tested: Notepad++ v7.2.2 (Windows 10)

Usage

  1. Download the Markdown language definition file
  1. In Notepad++ menu, click Language and select Define your language... .
  2. In User Defined Language windows, click Import then open the xml file.
  3. Restart Notepad++.
  4. Open and test with a Markdown file e.g. test.md

Enjoy!!

Limitations

Need your input to solve the following problems:

  • *em text* only parse the first word because it will screw up unorder list
  • _em text_, __strong text__ and ___em strong text___ only parse the first word because it will screw up some URL contains example__url

[NEW] Beta Is Available For Testing

A complete new version of color scheme is available in branch feature/emphasis-multiple-words.

It is going to solve the limitation: Parse more than one em word

However, if you use the new UDL file, you will need to change your habbit: No more * unordered list, but you still can use - or + instead.

⚠️ Alert:

The file name and UDL name are same with original. If you overwrite existing file, please download and import to NPP from this (master) branch.

Link: feature/emphasis-multiple-words

Welcome any comment and suggestion!

Build Script for Developers

In v1.1, a build script is provided for your convenience. It will follow the naming convention. It requires bash and mustache.js to run.

A Build Script To Help You Build Color Scheme

When you run at the first time:

# Check if mustache.js is able to run in current bash
mustache -v

# Check if the script works
source build.sh --help

Build workflow:

  1. Build a new color scheme: source build.sh [new_name] (no space, e.g. awesome_dark)
  2. The script will create a new json file in a new folder:

Build script demo step 2

  1. In the json file:
  • Change the name according to the theme, e.g. "Markdown (Awesome Dark)"
  • Add your prefered colors in the empty strings, e.g. "FFFFFF"

Build script demo step 3

  1. Build a XML file: source build.sh [new_name]

tips: Press ⬆️ to show your previous command.

  1. A new XML file is ready to serve in the root directory of this repo.
  2. Import in Notepad++ for testing. It's cool, right?

tips: Since the old XML is not overwritten, you can prepare two files in NPP.

  1. Move the XML file into the corresponding theme folder. Done!

Contribution

tl;tr For pull request, please do check Allow edits from maintainers, and merge from your new branch into my master branch; Or, propose a file change in Github directly; Or, hit me a message via issue page or my social contacts.

For details, please kindly read CONTRIBUTING.md.

🍺 Thank you so much! 🙏

Note to Original Repo from @thomsmits

Basically I revised the original repo from scratch.
If you don't feel good in my settings, please comment.
I'll try my best to improve.
Or, use Thomsmits' current repo :)

License

Copyright for portions of this repository are held by Thomas Smits, 2010 as part of his repository. All other copyright are held by Edditoria, 2012-2017.

See the LICENSE file for license rights and limitations (MIT).

About

Markdown syntax highlighting for Notepad++, by customized UDL (user defined language) file

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%