1.0.23
Live numbering feels snappier, and the foreign-numbering cleanup dialog is now fully interactive / 编号响应更快,清理外来编号对话框全面可交互
English
Usability improvements from real day-to-day use of the plugin.
-
A heading you just typed gets numbered right away. Previously, if you typed
## Some titleand moved the cursor straight to another line, the number never appeared — you had to make one more edit (pressing Enter was the usual accident that fixed it) before the plugin caught up. The same stall happened after changing a heading's level with#.The cause was a guard that froze the whole line your cursor was on. It existed for a good reason — to stop a trailing space you had just typed from being swallowed — but freezing the line also withheld the number, and its un-freeze condition ("once you move away") never actually fired: moving the cursor isn't an edit, so nothing woke the plugin up. That guard is gone. Only the trailing space itself is preserved now, and numbering is written in the same cycle no matter where your cursor is. The original trailing-space fix is fully intact: the space you just typed still survives, and is tidied up as before once you move on.
-
Numbering writes are surgical. Instead of rewriting the whole heading line, only the characters that actually changed are replaced. The number goes at the start of the line and your cursor is usually at the end, so the two no longer overlap — writing a number while you are still typing can't nudge your cursor or disturb a selection.
-
The "clean up foreign numbering" dialog is now interactive, not just a preview. Each heading gets its own checkbox (checked by default); uncheck the ones you actually wrote yourself, and they're left alone — except the plugin will still add its own numbering in front of them, the same as it would for any other unclaimed heading. Every "before → after" line now shows the real, final result — the number your template would actually produce — instead of the intermediate "stripped, not yet numbered" text. And with a search box at the top, you can jump straight to a specific heading in a long list instead of scrolling through it.
中文
来自日常实际使用的体验改进。
-
刚敲出来的标题会立刻编号。 此前你敲下
## 某个标题然后光标直接切到另一行,编号根本不会出现——必须再编辑一次(多数人是碰巧按了 Enter 才发现好了)插件才补上。用#改标题层级后也会卡住同样一下。根因是一道「冻结光标所在整行」的守卫。它本身是有道理的——防止你刚敲下的行尾空格被静默吃掉——但冻结整行连编号也一并扣住了,而解除冻结的条件(「等你把光标移开」)实际上从不成立:移动光标不是一次编辑,插件根本不会被唤醒。这道守卫已经拿掉,现在只保住行尾空格本身,编号则不论光标在哪都照常在当轮写入。原来那个修复一点没丢:你刚敲的空格依然保得住,等你移开后也照旧被清理干净。
-
编号写回改为精准改写。 插件不再重写整行标题,而是只替换真正变化的那几个字符。编号加在行首、你的光标通常在行尾,两者不再重叠——所以哪怕在你还在打字时写入编号,也不会挪动你的光标或打乱选区。
-
"清理非本插件的标题编号"对话框现在真正可交互,而不只是预览。每条标题都有独立的勾选框(默认勾选);取消勾选你自己手写的那些,插件不会去动它们的文字——但仍会像对待任何其它未接管的标题一样,在前面加上自己的编号。每一行"现状 → 清理后"对照现在展示的是套用模板后的真实最终结果,而不是"剥完外来编号、还没编号"的中间态。对话框顶部还加了搜索框,标题多的时候不必一条条翻找,直接搜、点结果就能跳过去。