• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Edditoria/markdown-plus-plus: Markdown syntax highlighting for Notepad++, by cus ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Edditoria/markdown-plus-plus

开源软件地址(OpenSource Url):

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

开源编程语言(OpenSource Language):

JavaScript 100.0%

开源软件介绍(OpenSource Introduction):

Markdown Syntax Highlighting for Notepad++

This repo "markdown-plus-plus" is a project to support Markdown syntax highlighting in Notepad++. It is done via various User Defined Language (UDL) XML files. All UDLs are carefully designed by human, rather than generated by machine.

You can simply consume the UDL XML file that matches your favorite theme, or config your own using the build system.

Thanks for encouragements and comments. This repo is not only for myself anymore. It's for everyone.

Love Notepad++? Need to write docs in Markdown? This repo is made for you.

Key Changes from v2 to v3

  • Markdown-plus-plus is a npm package now. You can fetch the UDL files in command line directly, npx markdown-plus-plus --help.
  • Build system relies on Node.js. git clone then npm install to develop this repo. Less dependency hell.
  • In v2, there are 2 builds for every theme: Modern and classic. Now, there are only 1 build. The main difference in classic build, asterisk-style bullet points, becomes an option in v3.
  • Better file structure:
    • You can find all UDL files in one single folder called <udl\>.
    • You can modify the config files in another folder called <config\>.
    • Filename for UDLs follows the pattern: <markdown.[theme-name].udl.xml>.
    • Filename for configs follows this pattern: <markdown.[theme-name].config.json>

Screenshots

Your Taste!
Markdown in Default Theme of Notepad++ Markdown in Zenburn Theme of Notepad++
Default Zenburn
Markdown in Bespin Theme of Notepad++ Markdown in Blackboard Theme of Notepad++
Bespin Blackboard
Markdown in Deep Black Theme of Notepad++ Markdown in Obsidian Theme of Notepad++
Deep Black Obsidian
Markdown in Solarized Theme of Notepad++ Markdown in Solarized-light Theme in Notepad++
Solarized Solarized-light
Markdown in Twilight Theme of Notepad++ Markdown in Material Theme in Notepad++
Twilight Material

Supports file extensions: .markdown and .md
Tested: Notepad++ v7.9 64-bit (on Windows 10)

Usage

Node.js

If you had installed Node.js in your system, you can use npx command to get UDL file(s):

:: Check whether you have Node.js installed
node -v

:: Go to UDL folder of Notepad++. Usually...
cd %AppData%\Notepad++\userDefineLangs

:: Example: Download Zenburn UDL file
npx markdown-plus-plus zenburn

:: Read help for details
npx markdown-plus-plus --help

Download Manually

  1. Download the source code in latest release page. It should be a zip file.
  2. Open the zip file and go to <udl\> folder.
  3. Copy a XML file of your favorite theme, and paste in <userDefineLangs\> folder of Notepad++. The directory is usually <%AppData%\Notepad++\userDefineLangs\>.
  4. Restart Notepad++.
  5. Open and test with a Markdown file e.g. test/at-a-glance.md.

Enjoy!!

Limitations

Need your input to solve the following problems:

  • _em text_, __strong text__ and ___em strong text___ only parse the first word because it will screw up some URLs such as example__url.
  • Cannot use asterisk-style bullet points (* a \<li\> bullet point). Instead, please write in - a bullet point or + a bullet point.
  • Improve documentations. My English sucks. (*´ー`*)
  • The GFM's strikethrough ~~like this~~ is still missing. Will do it later.

Build Your Own UDL Files

The best way to build your own UDL file is to fork this repo. You need to install Node.js in your system.

:: In your dev folder
git clone https://github.com/Edditoria/markdown-plus-plus.git
cd markdown-plus-plus
npm install

:: Play around. Finally, run the build script
npm run build

For details, please read the document: build-workflow.md

Options

Options are reviewed in v3. In each config file in the config folder, you can adjust for your own build. Here are some examples:

Option Descriptions
goodies.highlightHex Highlight HEX value.
flags.transparentBg Make the text background being transparent. ⚠️ Use it with caution
flags.asteriskUnorderedList Enable the markdown style of asterisk-style bullet points (* a \<li\> bullet point). ⚠️ Use it with caution

For details, please read the document: build-workflow.md

Contribution

tl;tr For pull request, please merge from your new branch into my master branch (recommend enabling "Allow edits from maintainers"); 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.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap