马自立14 downloadsLines in the editor glide instead of jumping: when you fold, unfold, move, indent, add or delete lines, each line slides from its old position to its new one and the cursor moves smoothly. Animation only; your notes are never changed.
简体中文 · English
编辑器里的行不再瞬移:折叠、展开、上下移动、缩进、回车、删除时,每一行从原来的位置滑到新位置,光标移动也带过渡。只加动画,不改笔记内容。
灵感来自 Bike Outliner:这款 Mac 大纲软件在折叠、移动、缩进时的流畅动画让写大纲很有手感,这个插件想把这种手感带到 Obsidian 里。
目录
不认具体命令,只比较每个可见行改动前后的位置,所以别的插件做的折叠、移动也都有动画。
动画时长 200 毫秒。输入法组字中不做动画。打开和切换文档时默认没有动效;如果有需要,可以在设置里打开「在打开和切换文档时有动效」。
在桌面端测过;没有标成仅桌面端,但还没在手机上测过。
在 CodeMirror 6 的 ViewPlugin 里用 FLIP:CodeMirror 改 DOM 之前记下每个可见行的位置,改完再量一次,用 transform 让每一行从旧位置滑到新位置。版式一步到位,动画只动 transform 和 clip-path,不会每帧重排整个工作区。
想追踪后续功能、反馈问题、关注后续进展,欢迎关注我的 Twitter:@Matsurimywaifu。
简体中文 · English
Lines in the Obsidian editor glide instead of jumping. When you fold, unfold, move, indent, add or delete lines, every line slides from where it was to where it ends up, and the cursor follows smoothly. It only adds animation: your notes are never changed.
Inspired by Bike Outliner, a Mac outliner whose smooth animations when folding, moving and indenting rows make outlining feel alive. This plugin brings that feel to Obsidian.
Contents
It works with any command or plugin that changes the text or folds, because it does not hook specific commands: it compares where each visible line was before an edit with where it is after.
Animations last 200 ms. Nothing is animated while you are composing with an input method. Opening and switching notes is not animated by default; you can turn on "Animate when opening and switching notes" in settings if you want it.
Tested on desktop. It is not marked desktop-only, but it has not been tested on mobile yet.
It uses the FLIP technique inside a CodeMirror 6 view plugin: before CodeMirror updates the DOM it records the position of every visible line, measures again afterwards, and animates each line with a transform from the old position to the new one. Layout changes once; only transforms and clip-path animate, so the rest of the workspace is not reflowed on every frame.
Search for Outline Motion in Settings → Community plugins, or copy main.js, manifest.json and styles.css from the latest release into <vault>/.obsidian/plugins/outline-motion/.
To follow new features, send feedback or keep up with progress, follow me on Twitter: @Matsurimywaifu.