Repository navigation
2.0.2
更新内容 / What's changed
笔记里嵌入的图片现在直接画在卡片上,点一下还能盖在导图上放大预览,视频也能在卡片上播;另外修好了就地编辑的三处手感:输入法的回车不再误关编辑框,注解条里 Enter 用来换行、代码块里 Shift+Enter 用来另起一行,Tab 也不会再把焦点扔到别处。
An embedded picture is drawn on the card now and opens enlarged over the map when clicked, and a video plays in place; plus three fixes to how in-place editing feels: an input method's Enter no longer closes the field, Enter writes a line in an annotation and Shift+Enter starts one in a code block, and Tab no longer throws the focus somewhere else.
新增 / Added
- 按住
Space拖鼠标,可以在任何地方平移画布。 以前只有空白处的拖拽是平移,指针一落在卡片上就变成拖动卡片或者选中卡片里的文字 —— 而想看一眼被挡住的角落时,卡片恰恰就在那儿。现在按住Space,指针变成手形,左键从哪里按下去都拖动画布:卡片上、代码块里、表格上都一样,压在文字上也不会变成选中文字。按住期间鼠标整块归画布,所以点卡片也不会顺带把它选中。
HoldSpaceand drag to pan the canvas from anywhere. Only blank space used to pan: the moment the pointer crossed a card it became a card drag, or a drag-select of that card's text — and a card is exactly what is in the way when you want to see what is behind it. WithSpaceheld the pointer turns into a hand and a left press pans from wherever it lands: over a card, inside a code sample, across a table, without selecting a word of it. While the key is down the mouse belongs to the canvas, so a click does not select a card on the way past. - 图片画在卡片上。
![[hero.png]]和不再是带文件名的斜体标签,而是图片本身。按它自己的尺寸画、绝不放大;宽度受卡片最大宽度限制,高度受新增的媒体最大高度限制(默认 200 像素)。![[hero.png|120]]里的数字是宽度上限,![[hero.png|色带]]里的竖线后面是别名。只有笔记库里的文件会被画出来 ——这类远程地址保持标签,导图不会替你联网。
Pictures are drawn on the card.![[hero.png]]andare the picture itself rather than an italic chip carrying its name. Drawn at its own size and never enlarged; its width is capped by Maximum card width and its height by the new Maximum media height (200 pixels by default). The number in![[hero.png|120]]is a width cap, and a name after the pipe in![[hero.png|The bands]]is an alias. Only files in the vault are drawn — a remote address such asstays a chip, because the map never goes to the network on your behalf. - 视频卡片是一张首帧静止画面,鼠标移上去才出现两个圆钮:▶(右下角)就地播放,卡片变成带进度条、音量和全屏的播放器;⧉(右上角)用 Obsidian 自己的播放器打开这个文件。开始播放后卡片不再是链接,点画面是暂停而不是打开文件。
A video card is a still frame with two circles, shown while the pointer is over it: ▶ (bottom right) plays it in place, turning the card into a player with a scrubber, volume and full screen, and ⧉ (top right) opens the file in Obsidian's own player. Once it is playing the card is no longer a link — clicking the picture pauses it rather than opening the file. - 导出文件自带图片。 导出的 SVG / PNG / HTML 里,图片会内嵌成 data URI,所以拷到别的机器、用浏览器打开都能看到 —— 以前那里是空白。视频不内嵌(体积太大),导出时退回成文字标签。
An exported file carries its pictures. In an exported SVG, PNG or HTML the pictures are inlined as data URIs, so the file shows them anywhere, on any machine — where they used to be blank. Videos are not inlined, because a minute of video is far too much to put in an HTML file; a video falls back to a text chip. - 两个新设置:显示图片和视频(默认开)和媒体最大高度(80–480,默认 200)。关掉前者,所有嵌入回到原来的标签形态。
Two new settings: Show pictures and videos (on by default) and Maximum media height (80–480, 200 by default). Turn the first one off and every embed goes back to the chip it was. - 点一下就放大预览。 点图片或视频,它会盖在导图上放大显示,背景变暗;点暗处、按
Esc、或点右上角的 ✕ 关掉。不跳标签页,也不离开你正在看的这张图 —— 要打开文件本身,按住Ctrl/Cmd再点(视频另有右上角的⧉)。预览最多放大到自身尺寸的 2 倍,再大只是把像素拉糊。
Click a picture or a video to enlarge it. It covers the map, the backdrop goes dark, and clicking that backdrop, pressingEscor using the ✕ in the corner puts everything back. No new tab, and no losing your place in the map — to open the file itself instead, holdCtrl/Cmdwhile you click (a video also has⧉in its top right). A preview enlarges up to twice the media's own size; past that it only stretches pixels. - 正文块卡片可以折起来了 —— 段落、代码块、表格都行,不再只有代码块。卡片侧面多了和父节点一样的折叠按钮,点一下整块只剩第一行内容(代码块留下的正好是围栏那行,写着语言;段落留下的是第一句),按钮留在原处等着把整块展开;再点一下展开。只有一行的块没有这个按钮:折起来还是那一行,等于没折。按钮一直都在,状态和折叠父节点一样按笔记记住,从不写进你的 markdown。
Any content card can be folded — paragraphs, code and tables alike, not just code blocks. The card carries the same fold button a parent card does: press it and the block is down to its first line of content (for a sample the opening fence, which names the language; for a paragraph its first sentence) and the button stays out in the open, where a folded branch shows its count, waiting to open the whole block again. A block of one line has no button, because folding it would still be showing that line. The button never goes away, and the fold is remembered per note exactly as a branch's is — never written into your markdown. - 代码块右上角多了语言角标和复制按钮。 围栏声明的语言写在卡片右上角,鼠标移上去(或键盘聚焦时)多出一个复制按钮,点一下整段代码进剪贴板,成功时变成 ✓;两者都绝对定位在代码上方,既不改变卡片尺寸,也不会被当成代码的一部分。导出的文件里不带这个按钮(它就是给界面用的),语言角标留着。
A sample's corner carries its language and a copy button. The language the fence named sits in the top right of the card, and a copy button arrives under the pointer (or on keyboard focus) which puts the whole sample on the clipboard and turns into a ✓ while it does; both are absolutely positioned above the code, so neither changes the card's size and neither reads as part of the sample. An exported file does not carry the button — it is there for the interface — and keeps the language. - 导图里能查找替换了。
Ctrl/Cmd+H打开查找栏并直接展开替换行(Ctrl/Cmd+F仍然只查找)。两个按钮是只替换这张卡片和全部替换,在替换框里按Enter就是全部替换。替换改的是笔记里的原文,所以**加粗**里的字被替换时,星号原地不动;一次替换不论动了多少张卡片,都只算一步撤销。
Find and replace, on the map.Ctrl/Cmd+Hopens the find bar with its replace row already showing (Ctrl/Cmd+Fstill only finds). The two buttons are Replace in this card and Replace all, andEnterin the replace field is Replace all. A replacement writes into the note's source, so replacing a word inside**bold**leaves the asterisks where they were; and however many cards one replacement touches, it is one undo step. - 一次可以选中好几张卡片。 按住
Shift(或Ctrl/Cmd)点卡片就把它加进选中,再点一次退出;在空白处按住Shift拖拽会拉出一个框,框住几张就选中几张。多选时Delete一次删掉全部,Space一次折叠或展开全部 —— 都是一步撤销。框选和加选只动内存里的选中状态,笔记一个字都不改。
Several cards can be selected at once. HoldShift(orCtrl/Cmd) and click a card to add it, click it again to drop it; holdShifton blank canvas and drag to sweep a box, and every card it covers is selected. With more than one selected,Deleteremoves them all andSpacefolds or opens them all — each as one undo step. Banding and adding only move the selection in memory; the note is not touched. > [!note]这样的 callout 现在画成卡片。 图标、标题、正文各就各位,颜色按类型区分,和 Obsidian 阅读视图里看到的是同一套;笔记没写标题时用 Obsidian 内置的那个标题(跟随界面语言)。> [!note]-折叠成只剩标题,> [!note]+展开,> [!note]里的表格照样画成表格。自定义类型(> [!我的类型])照画,用默认配色和笔记里写的那个词做标题。
A callout such as> [!note]is drawn as a card. Icon, title and body each take their place, the colour follows the type, and it is the same set Obsidian's reading view uses; with no title in the note the card shows Obsidian's own title for that type, in your interface language.> [!note]-folds it down to the title,> [!note]+opens it, and a table inside a callout is still a table. A custom type (> [!my-type]) is drawn too, in the default colour, titled with the word the note wrote.#标签画成徽章。 只有行首、空格或左括号后面的#才算标签,所以C#、网址里的#anchor和#42都还是普通文字 —— 和 Obsidian 自己的判断一致。
A#tagis drawn as a badge. Only a#that opens the line or follows a space or an opening bracket counts as a tag, soC#, a URL's#anchorand#42all stay ordinary text — the same rule Obsidian itself uses.- 节点可以链接到别的笔记。 右键菜单里多了「链接到某篇笔记…」「由该节点新建笔记」「打开链接的笔记」和「移除链接」,命令面板里也有对应的命令,都可以自己绑键。链接写进笔记就是普通的
[[笔记名]],不是插件自己的格式,Obsidian 里照样能点。
A node can link to another note. The card's menu now carries Link to a note…, New note from this node, Open the linked note and Remove the link, with matching commands in the palette, all rebindable. What lands in the note is an ordinary[[Note name]]rather than a format of the plugin's own, so it still works in Obsidian. - 新增「分支配色」设置。 经典是原来的那十种颜色,跟随主题改读 Obsidian 自己的
--color-*,让导图和界面其余部分同一个调子。两种配色都不写进笔记,导出的图里也照常带着颜色。
A new "Branch palette" setting. Classic is the ten colours the map has always used; Follow the theme reads Obsidian's own--color-*instead, so the map sits in the same key as the rest of the interface. Neither is written into the note, and an exported file carries the colours either way. - 代码块卡片可以拖着搬走了。 拖到另一张卡片上,它成为那张卡片的正文块;拖到一张卡片的上下边缘,它落到那张卡片旁边 —— 也就是成为那张卡片父节点的正文块;拖到另一张代码块卡片上,它落在那一块的上方或下方。搬动只改「把块挂到所属节点上」的那段缩进(两个节点正文列之差),块里的行一个字节都不动,所以围栏、代码、注释原样保留。怎么拿起一块:按住它的折叠按钮拖 —— 块在卡片上直接拖是选中和预览,不是搬家;按钮就长在卡片与父节点的连线上,正好是拿起它的地方。段落和表格同样能这样搬(以前只有围栏代码块能拖),因为搬的是行范围,和那几行写的是什么无关。
A code block card can be dragged somewhere else. Drop it on another card and it becomes that card's own body; on a card's top or bottom edge and it lands beside that card, as a block of that card's parent; on another code block card and it lands above or below that one. The move changes only the indentation that attaches a block to the node it hangs under — the difference between the two nodes' body columns — and touches not one byte inside the block, so fences, code and comments come through exactly as they were. How a block is picked up: hold its fold button and drag — dragging on the card itself selects and previews rather than moving; the button sits on the connector between the card and its parent, which is exactly where picking it up belongs. A paragraph or a table moves the same way (only fenced samples used to be draggable), because what moves is a range of lines and it does not matter what those lines say. - 拖动选中的卡片时,整组一起走。 选中好几张卡片后,拖动其中任意一张,整个选中都会跟着移动 —— 落在同一个位置,并保持它们在笔记里写的顺序,整个动作只算一步撤销。以前只有被抓住的那一张会动,而其余卡片上的选中圈一直在说它们也在这件事里。唯一的例外是正文卡片:代码块只有在你亲手拖它的时候才会被搬走,因为块是写在某张卡片下面的,它本身不是树里的卡片。
Dragging one of several selected cards moves all of them. With more than one card selected, dragging any of them takes the whole selection along — it lands together, in the order the note writes those cards in, and the whole gesture is one undo step. Only the card under the pointer used to move, while the rings on the others said they were in it too. One exception: a note-content card travels only when it is the card you picked up, because a block is written under a card rather than being a card in the tree.
修复 / Fixed
- 导图一打开就能用,不必先点一下它。 导图自己的按键(用来平移的
Space、以及「设置」里那整张快捷键表)是挂在画布上的监听,而键盘事件只会送到持有焦点的那个元素 —— 打开视图时 Obsidian 把焦点交给了面板,比画布高一层,于是刚打开的导图对键盘完全没有反应:按Space拖不动画布,快捷键一个都不响应,直到你点一下它。现在打开导图、以及切回导图的标签页时,焦点都直接落到画布上;正在编辑、焦点已经在导图里、或者导图不在前台的,一律不动。
A map works the moment it opens, without clicking it first. The map's own keys —Spacefor panning, and the whole shortcut table in its settings — are listeners on the canvas, and a key event only reaches the element that holds the focus. Opening a view hands the focus to the pane, one element above the canvas, so a freshly opened map answered nothing that needed a key:Spacedid not move the canvas and no shortcut fired, until it was clicked. Opening a map, and coming back to its tab, now put the focus straight on the canvas; an edit in progress, a focus already inside the map, or a map that is not the one in front, all leave it alone. - 框选出来的多选不会再立刻消失。 松开鼠标时,框选本身选得好好的,但紧随其后还会来一个
click—— 指针被画布捕获了,这个 click 的落点被算成「空白处」,而点空白处的意思正是「清空选择」,于是框选刚拉完就自己被抹掉了,看起来像框选根本没生效。现在这个收尾点击被吃掉,框选的结果留得住,接着就能整组拖动。
A box selection no longer vanishes the instant it is drawn. The band itself selected fine, but aclickfollows the release — the pointer was captured by the canvas, so that click resolves to blank space, and clicking blank space is exactly what clears the selection. The box's work was erased the moment it closed, which read as banding doing nothing at all. That trailing click is swallowed now, so what the box caught stays caught and can be dragged as a group. - 框选只会选中卡片本身。 正文卡片(段落、代码块、表格)不再被框选加进选区 —— 它们不是树里的节点,混进一组里会让整组都落不下去,于是框选连同其中的代码块一起拖时,整组一动不动。正文块跟着它所属的那张卡片走。
A band takes cards, and only cards. Note-content cards (a paragraph, a code block, a table) are no longer swept into the selection: they are not nodes in the tree, and one of them in a group refuses every drop, so banding a card together with its code block left the whole group unable to move. A block follows the card it hangs under. - 设置窗口的标题会跟着语言一起换。 标题只在打开时写一次,而切换语言重绘的是窗口里的内容 —— 于是标题一直说着打开时那门语言,内容已经是新的了。现在重绘时标题一起更新,不关掉重开也对得上。
The settings window's title follows the language too. It was written once, on open, while a change of language redrew the contents inside — so the title kept speaking the language the window opened in over content that had already moved on. The title is redrawn with the rest now, and no longer needs the window closed and reopened to agree. - 按住
Ctrl/Cmd+Z不会再刷出一整列「没有可撤销的操作」了。 撤销栈空的时候每按一次就弹一条提示,而一条要挂好几秒,所以按住不放的那一秒里就堆了十几条一模一样的句子。现在一段连按(按住不放,或者连着敲)最多挂出三条:随着按键一条条出现,松开之后一起消失;切走笔记或关掉标签页时也一起收掉。三条是有意的 —— 一条在角落里太容易被忽略,而这条提示正是按键还在起作用的唯一迹象。
HoldingCtrl/Cmd+Zno longer fills the corner with "nothing to undo". With the stack empty every press put up a notice of its own, and each one lives for seconds, so the first second of a held key piled a dozen copies of the same sentence. A run of presses — held down, or tapped in succession — now puts up at most three: they appear one per press until it has them, and they all go together a moment after you stop. Three is deliberate — a single notice in the corner is too easy to overlook, and it is the only sign the key is doing anything at all. - 顶级分支可以拖到另一张顶级分支旁边了。 落在顶级卡片上的「排到它前面 / 后面」以前会被拒绝,拖拽只好退回到唯一还合法的落点,于是不论往哪儿拖都变成「成为它的子节点」—— 既没法给顶级分支换位置,也没法把深处的卡片提到顶级这一层。现在顶级分支和别的卡片一样:落在它旁边就是排到它前面 / 后面。同一趟还修好了根节点左侧那些卡片落点半边颠倒的问题:布局把一棵子树整个画在父节点的同一侧,那些卡片的孩子画在左边,「成为子节点」却在右边判,两半的分工正好反了。
A top-level branch can be dragged beside another one. A drop on a top-level card used to be refused for "before / after", so the drag fell back to the one slot that was still legal and every gesture became "become its child" — a top-level branch could not be moved and a buried card could not be brought up to that level. A top-level branch is now like any other card: beside it means before it or after it. The same pass fixed the two halves of every card left of the root, which were the wrong way round: the layout keeps a subtree on one side of its parent, so those cards draw their children to their left, while "become its child" was being read off their right half. - 用中文、日文、韩文输入法打字时,那个用来确认候选词的回车不再被当成「保存」,编辑框不会在你打到一半时关掉。三处就地编辑(节点标题、正文卡片、注解条)都补上了组合态判断 —— 查找栏一直有这道判断,编辑框漏了。
Under a Chinese, Japanese or Korean input method, the Enter that confirms a candidate is no longer read as "save", so the field does not close mid-word. All three in-place editors (the node title, a content card, an annotation) now carry the composition guard the find bar has always had.
改动 / Changed
Space折叠改成「松开」时生效。 展开 / 折叠原来是按下就触发,可同一个键现在还要当平移键 —— 按住它拖画布的同时把卡片折起来,显然不是谁想要的。所以它照旧按下,但等到松开才动作:这中间只要按过鼠标左键(也就是那一下其实是平移),这一次就不折叠。把折叠改绑到别的键上的用户不受影响,仍然是按下即触发。Spacefolds on release. The fold used to fire on the way down, and the same key is the pan key now — folding a card while dragging the canvas with it is plainly not what anyone meant. It still goes down like any other key, but nothing happens until it comes back up: a press of the mouse in between (which is to say, a pan) drops the fold for that hold. A fold moved to another key is untouched, and still fires on the way down.- 顶级分支的先后顺序现在由你的笔记决定。 布局从来只是读笔记里写的顺序 —— 先读根右边那一列,再读左边那一列 —— 再按子树重量把它切成两半分到两侧,所以这个顺序一直是可以改的,以前只是不允许改。现在
Ctrl/Cmd+↑/↓和在导图上拖都能给顶级分支换位置;均衡模式下把一张拖过分界点,它会换到根的另一侧,因为顺序是第一位的、边跟着顺序走。想让位置和顺序完全对应,把「布局」设成单侧。落点跟着卡片所在的侧镜像:背对根节点的那一半是「成为子节点」,朝向根节点的那一半是「排前 / 排后」。
The order of the top-level branches is your note's to decide now. The layout only ever read the order the note is written in — down the right column of the root, then down the left — and cut that order in half by subtree weight, so the order was always changeable; it was simply not allowed.Ctrl/Cmd+↑/↓and dragging both move a top-level branch now, and in balanced layout a drop past the halfway point moves it to the other side of the root, because the order comes first and the side follows it. To have position and order line up exactly, set Layout to One side. The two halves of a card mirror with the side it is on: the half facing away from the root is "become its child", and the half facing the root is "before / after". - 注解条里
Enter现在是换行,保存改到了Ctrl/Cmd+Enter—— 注解本来就可以有好几行,插件自己的提示文案一直也是这么写的,只是编辑器没照做。代码块卡片在编辑时用Shift+Enter另起一行,因为代码没有换行就不成其为代码;卡片只是被选中、没在编辑时,Shift+Enter仍然是导图自己的「添加文字块」,和别的卡片一样。节点标题、段落卡片和表格卡片的Enter保存一律没动。
In an annotation,Enternow writes a line and saving moved toCtrl/Cmd+Enter— an annotation may hold several lines, and the plugin's own hint text has always said so; the editor just did not do it. A code block card takesShift+Enterfor a new line while it is being edited, because a sample without its line breaks is not the sample; with the card merely selected and no editor open,Shift+Enteris still the map's own "add a text block", exactly as it is for every other card. A node title, a paragraph and a table all keep saving onEnter, unchanged. - 新增「拖动模式」设置,空白处直接拖动的默认行为随之改变。 关闭时(默认)在空白处直接拖动是框选,平移画布改为按住
Space再拖(鼠标中键和滚动照旧);打开后直接拖动就是平移,框选改用Shift+ 拖动 —— 也就是这个设置出现之前导图本来的样子。两种情况里Space+ 拖动和Shift+ 点击都照常有效,所以随时可以试。第一次打开会弹一条说明,因为它换掉的是你已经形成习惯的手势,不说一声就像导图坏了;之后再关再开都不再提示。设置在「设置 → MindFlow → 偏好」里。
A new "Drag mode" setting, and with it a new default for what a plain drag on blank canvas does. Off — the default — a plain drag on blank canvas draws the selection box, and the map is moved by holdingSpaceand dragging (the middle button and the scroll wheel are unchanged); on, a plain drag moves the map and the box moves toShift+drag, which is how the map behaved before the setting existed.Space+drag andShift+click work either way, so it costs nothing to try. Turning it on the first time puts up a notice, because what it moves is a gesture you already have in your fingers, and moving one silently feels like the map broke; turning it off and on again says nothing. It lives in Settings → MindFlow → Preferences. - 就地编辑时按
Tab不再把焦点扔给界面上「下一个」元素 —— 那会顺带通过失焦把编辑提交掉,而焦点落在哪儿你完全没得选。现在它明确地保存并结束编辑,焦点交回导图。
PressingTabwhile editing no longer throws the focus onto whatever element comes next in the interface, which closed the editor through the blur on the way past and left the focus somewhere you never picked. It now saves and ends the edit outright, and hands the focus back to the map. - 新增两个键位和两个手势,都在快捷键设置里,可以改也可以清空:
Ctrl/Cmd+H查找替换(默认绑定),Shift+点卡片加选、Shift+拖拽空白处框选。按住Shift时空白画布不再平移,因为那个手势现在是框选;不按Shift平移照旧。
Two new keys and two new gestures, all in the shortcuts settings, all rebindable and all clearable:Ctrl/Cmd+Hfor find and replace (bound by default),Shift+click a card to add it to the selection, andShift+drag on blank canvas to band a selection. Blank canvas no longer pans whileShiftis held, because that gesture is the band now; withoutShiftit pans exactly as before.
Full changelog: 2.0.1...2.0.2
安装 / Install
手动安装: 把下方的 main.js、manifest.json、styles.css 下载到
<your vault>/.obsidian/plugins/mindflow/
然后在 设置 → 第三方插件 中启用 MindFlow。
(或者下载 mindflow.zip,解压到 .obsidian/plugins/ 下,一个文件搞定。)
BRAT: 把 AuroraEchop/MindFlow 添加为 beta 插件。
Manual: download main.js, manifest.json and styles.css below into the folder above,
then enable MindFlow in Settings → Community plugins.
(Or download mindflow.zip and unzip it into .obsidian/plugins/ -- one download instead of three.)
BRAT: add AuroraEchop/MindFlow as a beta plugin.
用法 / Use it
打开一篇笔记,在命令面板里运行 Toggle mind map view —— 给它绑一个快捷键,
用起来就像切换阅读模式。导图在同一个标签页、同一个文件上打开,不会创建任何文件。
Open a note and run Toggle mind map view from the command palette —
assign it a hotkey to make it feel like switching reading mode. The map
opens in the same tab, on the same file. No files are ever created.
Built from 2.0.2 with tests and typecheck passing.