notepad++与markdown

notepad++调用python将markdown转换为html

F5运行里,粘贴以下命令html

cmd /c c:\Python27\python -m markdown "$(FULL_CURRENT_PATH)" -e chinese > "$(CURRENT_DIRECTORY)\$(NAME_PART).htm"

markdown必须知足以下条件,不然没法转换:python

  • markdown文件格式必须为Dos\Windows
  • markdown文件编码必须为ANSI

notepad++高亮markdown

进入notepad++配置目录(运行:%APPDATA%\Notepad++) 新建文件 mkDefineLang.xmlmarkdown

<NotepadPlus>
    <UserLang name="Markdown" ext="md">
        <Settings>
            <Global caseIgnored="yes" escapeChar="\" />
            <TreatAsSymbol comment="no" commentLine="yes" />
            <Prefix words1="yes" words2="yes" words3="yes" words4="yes" />
        </Settings>
        <KeywordLists>
            <Keywords name="Delimiters">[_0]_0</Keywords>
            <Keywords name="Folder+"></Keywords>
            <Keywords name="Folder-"></Keywords>
            <Keywords name="Operators">+</Keywords>
            <Keywords name="Comment">1 2 0# 0## 0### 0#### 0#####</Keywords>
            <Keywords name="Words1">http:// (http:// (/ /</Keywords>
            <Keywords name="Words2">** * -</Keywords>
            <Keywords name="Words3">====== -------</Keywords>
            <Keywords name="Words4">&gt;</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="KEYWORD1" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="KEYWORD2" styleID="6" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="KEYWORD3" styleID="7" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="KEYWORD4" styleID="8" fgColor="808040" bgColor="D5FFD5" fontName="" fontStyle="0" />
            <WordsStyle name="COMMENT" styleID="1" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="COMMENT LINE" styleID="2" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="NUMBER" styleID="4" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="OPERATOR" styleID="10" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="DELIMINER1" styleID="14" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
            <WordsStyle name="DELIMINER2" styleID="15" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" />
            <WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
        </Styles>
    </UserLang>
</NotepadPlus>
相关文章
相关标签/搜索