wiz笔记用 Markdown语法记笔记

markdown是一个超文本标记语言, 类似于html,但更简便。适合写博客,记笔记,写文档等。wiz支持markdown语法,但是自带编辑器不支持markdown语法高亮。要想编辑的时候能够高亮显示(这样看起来比较舒服),该怎么办呢?

虽然wiz自带的编辑器不支持语法高亮,但是wiz支持使用外部编辑器编辑,可以考虑用外部编辑器实现。

我比较常用的文本编辑器包括Notepad++,VIM,其实这两种编辑器都可以拓展实现markdown语法高亮。

下面以Notepad++为例:

  1. 实现Notepad++对markdown语法高亮

    • 开始菜单 -> 运行(或者直接按 Ctrl+R) -> 输入 %APPDATA%\Notepad++
    • 创建语言拓展文件 userDefineLang.xml
    • userDefineLang.xml中添加如下内容(百度可以找到其他网友分享的userDefineLang.xml文件):
      <NotepadPlus>
      <UserLang name="Markdown" ext="markdown mdown mkdn mdwn mkd md" udlVersion="2.1">
          <Settings>
              <Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
              <Prefix Keywords1="yes" Keywords2="yes" Keywords3="no" Keywords4="yes" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
          </Settings>
          <KeywordLists>
              <Keywords name="Comments">00# 00## 00### 00#### 00##### 00###### 01 02 03<!-- 04--></Keywords>
              <Keywords name="Numbers, prefix1"></Keywords>
              <Keywords name="Numbers, prefix2"></Keywords>
              <Keywords name="Numbers, extras1"></Keywords>
              <Keywords name="Numbers, extras2"></Keywords>
              <Keywords name="Numbers, suffix1">.</Keywords>
              <Keywords name="Numbers, suffix2"></Keywords>
              <Keywords name="Numbers, range"></Keywords>
              <Keywords name="Operators1"></Keywords>
              <Keywords name="Operators2"></Keywords>
              <Keywords name="Folders in code1, open"></Keywords>
              <Keywords name="Folders in code1, middle"></Keywords>
              <Keywords name="Folders in code1, close"></Keywords>
              <Keywords name="Folders in code2, open"></Keywords>
              <Keywords name="Folders in code2, middle"></Keywords>
              <Keywords name="Folders in code2, close"></Keywords>
              <Keywords name="Folders in comment, open"></Keywords>
              <Keywords name="Folders in comment, middle"></Keywords>
              <Keywords name="Folders in comment, close"></Keywords>
              <Keywords name="Keywords1">http:// https:// (http:// (https:// (/ <http:// <https://</Keywords>
              <Keywords name="Keywords2">--- ===</Keywords>
              <Keywords name="Keywords3">- + ></Keywords>
              <Keywords name="Keywords4">*</Keywords>
              <Keywords name="Keywords5"></Keywords>
              <Keywords name="Keywords6"></Keywords>
              <Keywords name="Keywords7"></Keywords>
              <Keywords name="Keywords8"></Keywords>
              <Keywords name="Delimiters">00` 01\ 02` 03[ 04\ 05] 06** 07\ 08** 09__ 10\ 11__ 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
          </KeywordLists>
          <Styles>
              <WordsStyle name="DEFAULT" fgColor="71947C" bgColor="002B36" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="COMMENTS" fgColor="F24B0F" bgColor="002B36" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="LINE COMMENTS" fgColor="F24B0F" bgColor="002B36" fontName="" fontStyle="1" nesting="1055" />
              <WordsStyle name="NUMBERS" fgColor="04D9D9" bgColor="002B36" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="KEYWORDS1" fgColor="F2CF66" bgColor="002B36" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="KEYWORDS2" fgColor="F24B0F" bgColor="002B36" fontName="" fontStyle="1" nesting="0" />
              <WordsStyle name="KEYWORDS3" fgColor="04D9D9" bgColor="002B36" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="KEYWORDS4" fgColor="04D9D9" bgColor="002B36" fontName="" fontStyle="2" nesting="0" />
              <WordsStyle name="KEYWORDS5" fgColor="002B36" bgColor="A9B1AC" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="KEYWORDS6" fgColor="002B36" bgColor="A9B1AC" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="KEYWORDS7" fgColor="002B36" bgColor="A9B1AC" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="KEYWORDS8" fgColor="002B36" bgColor="A9B1AC" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="OPERATORS" fgColor="0000FF" bgColor="A9B1AC" fontName="" fontStyle="1" nesting="0" />
              <WordsStyle name="FOLDER IN CODE1" fgColor="F8F8F8" bgColor="A9B1AC" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="FOLDER IN CODE2" fgColor="002B36" bgColor="A9B1AC" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="FOLDER IN COMMENT" fgColor="002B36" bgColor="A9B1AC" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="DELIMITERS1" fgColor="F2994B" bgColor="002B36" fontName="Courier New" fontStyle="0" nesting="0" />
              <WordsStyle name="DELIMITERS2" fgColor="F2CF66" bgColor="002B36" fontName="" fontStyle="1" nesting="0" />
              <WordsStyle name="DELIMITERS3" fgColor="04D9D9" bgColor="002B36" fontName="" fontStyle="1" nesting="9243" />
              <WordsStyle name="DELIMITERS4" fgColor="04D9D9" bgColor="002B36" fontName="" fontStyle="1" nesting="9239" />
              <WordsStyle name="DELIMITERS5" fgColor="04D9D9" bgColor="002B36" fontName="" fontStyle="2" nesting="9231" />
              <WordsStyle name="DELIMITERS6" fgColor="002B36" bgColor="A9B1AC" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="DELIMITERS7" fgColor="002B36" bgColor="A9B1AC" fontName="" fontStyle="0" nesting="0" />
              <WordsStyle name="DELIMITERS8" fgColor="002B36" bgColor="A9B1AC" fontName="" fontStyle="0" nesting="0" />
          </Styles>
      </UserLang>
      </NotepadPlus>
      
    • 重启 Notepad++
      这个过程之后, Notepad++就可以高亮显示markdown语法了

      参考:
      notepad++安装markdown插件
      userDefineLang.xml

  2. 将Notepad++设置为wiz的默认编辑器

    设置->选项->编辑->添加->默认编辑器
    
  3. 编辑
    在wiz中新建一篇文章, 命名为 test.md (必须添加 .md 后缀才会被当成markdown语法解析), 点击"编辑”, Notepad++ 就弹出来了, 享受markdown高亮编辑吧!

你可能感兴趣的:(wiz笔记用 Markdown语法记笔记)