1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
| [test] ENABLE = false
[auto_number] ENABLE_FENCE = false
[slash_commands]
ENABLE = true
NAME = "斜杠命令"
TRIGGER_REGEXP = "(?<!<)[\\/、\\\\](?<kw>[^\\/、\\\\]*)$"
MATCH_STRATEGY = "abbr"
COMMANDS = [ { enable = true, type = "command", icon = "📝", hint = "一级标题", keyword = "H1", callback = "() => File.editor.stylize.changeBlock('header1', undefined, true)" }, { enable = true, type = "command", icon = "📝", hint = "二级标题", keyword = "H2", callback = "() => File.editor.stylize.changeBlock('header2', undefined, true)" }, { enable = true, type = "command", icon = "📝", hint = "三级标题", keyword = "H3", callback = "() => File.editor.stylize.changeBlock('header3', undefined, true)" }, { enable = true, type = "command", icon = "📝", hint = "四级标题", keyword = "H4", callback = "() => File.editor.stylize.changeBlock('header4', undefined, true)" }, { enable = true, type = "command", icon = "📝", hint = "五级标题", keyword = "H5", callback = "() => File.editor.stylize.changeBlock('header5', undefined, true)" }, { enable = true, type = "command", icon = "📝", hint = "六级标题", keyword = "H6", callback = "() => File.editor.stylize.changeBlock('header6', undefined, true)" }, { enable = true, type = "command", icon = "📝", hint = "段落", keyword = "Paragraph", callback = "() => File.editor.stylize.changeBlock('paragraph')" }, { enable = true, type = "command", icon = "📝", hint = "提升标题等级", keyword = "IncreaseHeaderLevel", callback = "() => File.editor.stylize.increaseHeaderLevel()" }, { enable = true, type = "command", icon = "📝", hint = "降低标题等级", keyword = "DecreaseHeaderLevel", callback = "() => File.editor.stylize.decreaseHeaderLevel()" }, { enable = true, type = "command", icon = "📝", hint = "表格", keyword = "Table", callback = "() => File.editor.tableEdit.insertTable()" }, { enable = true, type = "command", icon = "📝", hint = "公式块", keyword = "BlockMath", callback = "() => File.editor.stylize.toggleMathBlock()" }, { enable = true, type = "command", icon = "📝", hint = "代码块", keyword = "BlockCode", callback = "() => File.editor.stylize.toggleFences()" }, { enable = true, type = "command", icon = "📝", hint = "引用", keyword = "Blockquote", callback = "() => File.editor.stylize.toggleIndent('blockquote')" }, { enable = true, type = "command", icon = "📝", hint = "有序列表", keyword = "OrderedList", callback = "() => File.editor.stylize.toggleIndent('ol')" }, { enable = true, type = "command", icon = "📝", hint = "无序列表", keyword = "UnorderedList", callback = "() => File.editor.stylize.toggleIndent('ul')" }, { enable = true, type = "command", icon = "📝", hint = "任务列表", keyword = "Tasklist", callback = "() => File.editor.stylize.toggleIndent('tasklist')" }, { enable = true, type = "command", icon = "📝", hint = "增加列表缩进", keyword = "ListMoreIndent", callback = "() => File.editor.UserOp.moreIndent(File.editor)" }, { enable = true, type = "command", icon = "📝", hint = "减少列表缩进", keyword = "ListLessIndent", callback = "() => File.editor.UserOp.lessIndent(File.editor)" }, { enable = true, type = "command", icon = "📝", hint = "在上方插入段落", keyword = "InsertParagraphAbove", callback = "() => File.editor.UserOp.insertParagraph(true)" }, { enable = true, type = "command", icon = "📝", hint = "在下方插入段落", keyword = "InsertParagraphBelow", callback = "() => File.editor.UserOp.insertParagraph(false)" }, { enable = true, type = "command", icon = "📝", hint = "链接引用", keyword = "DefLink", callback = "() => File.editor.stylize.insertBlock('def_link')" }, { enable = true, type = "command", icon = "📝", hint = "脚注", keyword = "DefFootnote", callback = "() => File.editor.stylize.insertBlock('def_footnote')" }, { enable = true, type = "command", icon = "📝", hint = "水平分割线", keyword = "Hr", callback = "() => File.editor.stylize.insertBlock('hr')" }, { enable = true, type = "command", icon = "📝", hint = "内容目录", keyword = "Toc", callback = "() => File.editor.stylize.insertBlock('toc')" }, { enable = true, type = "command", icon = "📝", hint = "元信息", keyword = "FrontMatter", callback = "() => File.editor.stylize.insertMetaBlock()" }, { enable = true, type = "command", icon = "👕", hint = "粗体", keyword = "Strong", callback = "() => File.editor.stylize.toggleStyle('strong')" }, { enable = true, type = "command", icon = "👕", hint = "斜体", keyword = "Em", callback = "() => File.editor.stylize.toggleStyle('em')" }, { enable = true, type = "command", icon = "👕", hint = "下划线", keyword = "Underline", callback = "() => File.editor.stylize.toggleStyle('underline')" }, { enable = true, type = "command", icon = "👕", hint = "代码", keyword = "Code", callback = "() => File.editor.stylize.toggleStyle('code')" }, { enable = true, type = "command", icon = "👕", hint = "内联公式", keyword = "InlineMath", callback = "() => File.editor.stylize.toggleStyle('inline_math')" }, { enable = true, type = "command", icon = "👕", hint = "删除线", keyword = "Delete", callback = "() =>File.editor.stylize.toggleStyle('del')" }, { enable = true, type = "command", icon = "👕", hint = "注释", keyword = "Comment", callback = "() => File.editor.stylize.toggleStyle('comment')" }, { enable = true, type = "command", icon = "👕", hint = "超链接", keyword = "Link", callback = "() => File.editor.stylize.toggleStyle('link')" }, { enable = true, type = "command", icon = "👕", hint = "图像", keyword = "Image", callback = "() => File.editor.stylize.toggleStyle('image')" }, { enable = true, type = "command", icon = "👕", hint = "清除样式", keyword = "ClearStyle", callback = "() => File.editor.stylize.clearStyle()" }, { enable = true, type = "command", icon = "🧰", hint = "至顶部", keyword = "JumpTop", callback = "() => File.editor.selection.jumpTop()" }, { enable = true, type = "command", icon = "🧰", hint = "至底部", keyword = "JumpBottom", callback = "() => File.editor.selection.jumpBottom()" }, { enable = true, type = "command", icon = "🧰", hint = "至行首", keyword = "JumpToLineStart", callback = "() => File.editor.selection.jumpToLineStart()" }, { enable = true, type = "command", icon = "🧰", hint = "至行尾", keyword = "JumpToLineEnd", callback = "() => File.editor.selection.jumpToLineEnd()" }, { enable = true, type = "command", icon = "🧰", hint = "帮助", keyword = "Help", callback = "() => this.call()" }, { enable = true, type = "gen-snp", icon = "🧩", hint = "日期时间", keyword = "Datetime", callback = "() => new Date().toLocaleString('chinese', {hour12: false})" }, { enable = true, type = "gen-snp", icon = "🧩", hint = "日期", keyword = "Date", callback = "() => {let day = new Date(); return `${day.getFullYear()}/${day.getMonth() + 1}/${day.getDate()}`}" }, { enable = true, type = "gen-snp", icon = "🧩", hint = "时间", keyword = "Time", callback = "() => {let day = new Date(); return `${day.getHours()}:${day.getMinutes()}:${day.getSeconds()}`}" }, { enable = true, type = "gen-snp", icon = "🧩", hint = "时间戳", keyword = "Timestamp", callback = "() => new Date().getTime().toString()" }, { enable = true, type = "gen-snp", icon = "🧩", hint = "星期", keyword = "Week", callback = "() => '星期' + '日一二三四五六'.charAt((new Date()).getDay())" }, { enable = true, type = "snippet", icon = "🧩", hint = "示例片段", keyword = "SnippetExample", callback = "https://github.com/obgnail/typora_plugin" }, { enable = true, type = "snippet", scope = "inline_math", icon = "🧩", keyword = "alpha", callback = "\\alpha " }, { enable = true, type = "snippet", scope = "inline_math", icon = "🧩", keyword = "beta", callback = "\\beta " }, { enable = true, type = "snippet", scope = "inline_math", icon = "🧩", keyword = "epsilon", callback = "\\epsilon " }, { enable = true, type = "snippet", scope = "inline_math", icon = "🧩", keyword = "rightarrow", callback = "\\rightarrow " }, { enable = true, type = "snippet", icon = "🎨", hint = "绿色下划线动画", keyword = "span1", callback = """<span class="fas faa-ring animated-hover" style="border-bottom:3px solid green"></span>""" }, { enable = true, type = "snippet", icon = "🎨", hint = "紫色书法文字", keyword = "span2", callback = """<span style="text-align:center;font-size:20px;font:30px 书体坊兰亭体;color:blueviolet;word-spacing:30px;">“ ”</span>""" }, { enable = true, type = "snippet", icon = "🎨", hint = "弹跳紫色下划线", keyword = "span3", callback = """<span style="class: faa-bounce animated-hover;border-bottom: 5px solid #8F81EF;"></span>""" }, { enable = true, type = "snippet", icon = "🎨", hint = "宝蓝高亮标记", keyword = "span4", callback = """<mark style="background:royalBlue;border-bottom:lightblue 2px solid;color:white;font-family:consolas"></mark>""" }, { enable = true, type = "snippet", icon = "🎨", hint = "粉红圆角标签", keyword = "span5", callback = """<span class="concept-tag" style="display: inline-block;background: #C2185B;color: white;padding: 2px 8px;border-radius: 6px;font-weight: bold;font-size: 0.95em;"></span>""" }, { enable = true, type = "snippet", icon = "🎨", hint = "绿色圆角标记", keyword = "span6", callback = """<mark class="effect-note" style="background: #2E7D32;color: white;padding: 3px 8px;border-radius: 4px;font-weight: 600;font-size: 0.9em;"></mark>""" }, { enable = true, type = "snippet", icon = "🎨", hint = "彩云字体", keyword = "span7", callback = """<font size=10px style="font-weight:700;font-family:'华文彩云';color:rgb(100,190,100)"></font>""" }, { enable = true, type = "snippet", icon = "🎨", hint = "黑色虚线边框", keyword = "span8", callback = """<span style="border-bottom: 2px dashed #000000"></span>""" }, { enable = true, type = "snippet", icon = "🎨", hint = "黑色代码块", keyword = "span9", callback = """<div style="background: #000;color:#0F0;font-family:Consolas, monospace;padding:12px;border-radius:6px;overflow-x:auto;margin:1em 0;"> 1 <br> 2 </div>""" }, { enable = true, type = "snippet", icon = "🎨", hint = "红色圆形标记", keyword = "span10", callback = """<mark class="performance-boost" style="display: inline-block;background: #D32F2F;color: white;padding: 2px 8px;border-radius: 20px;font-weight: 600;font-size: 0.95em;"> </mark>""" }, { enable = true, type = "snippet", icon = "✍️", hint = "文章编辑中", keyword = "todo", callback = """<div style="background-color: #cce5ff; color: #004085; padding: 15px; border-radius: 5px; border: 1px solid #b8daff; margin-bottom: 20px;"> <h3 style="margin-top: 0; color: #004085;"><i class="fas fa-edit"></i>正在编辑中...</h3> <p>正在努力完善这篇文章的内容。在此期间,部分信息可能会有所缺失或不准确。</p> <small>预计更新日期:2099 年 12 月 30 日</small> </div>""" }, { enable = true, type = "snippet", icon = "🤖", hint = "AI生成说明", keyword = "AIINFO", callback = """<div style="padding:10px 0; margin:20px 0; font-size:0.9em; color:#888; border-top:1px dashed #eee; border-bottom:1px dashed #eee;"> <em>本文部分内容由 AI 生成,经人工修订。</em> </div>""" }, ]
|