Centerline 是一个 Obsidian 插件,为 Markdown 编辑器提供类似 Typora 的专注模式和打字机模式。
F8:切换专注模式F9:切换打字机模式阅读模式不会被修改。
在 GitHub Releases 下载与 manifest 版本一致的 main.js、manifest.json 和 styles.css。
在 vault 中创建目录:
<你的 vault>/.obsidian/plugins/centerline/
将这三个文件放入该目录。
打开 Obsidian 的 设置 > 社区插件。
启用 Centerline。
也可以从对应版本的 GitHub Release 单独下载 main.js、manifest.json 和 styles.css,再按上面的目录结构放入插件文件夹。
打开 设置 > 社区插件 > Centerline,可以:
专注模式默认透明度为 42%,设置会在插件重载后保留。
命令面板提供:
插件不会给命令注册固定快捷键,快捷键统一在设置页管理。
项目采用 Obsidian 官方 sample plugin 的工程结构,使用 TypeScript 和 esbuild。
npm install
npm run build
npm run dev
开发构建会生成 main.js。将它与 manifest.json、styles.css 一起复制到 vault 的插件目录即可。
CodeMirror 6 扩展通过 registerEditorExtension 注册,Obsidian 提供的 CodeMirror 包在构建中保持 external,避免加载第二份 CodeMirror 实例。
本项目使用 MIT License,详见 LICENSE。
Centerline adds independent Focus Mode and Typewriter Mode to Markdown editors. Focus Mode dims non-active lines and offers adjustable opacity. Typewriter Mode smoothly centers the cursor line and avoids restarting its scroll animation while typing on the same line. It supports Live Preview, Source Mode, desktop, and mobile.
Default shortcuts are F8 for Focus Mode and F9 for Typewriter Mode. Both can be changed in the searchable Centerline settings. The plugin is MIT-licensed.
To install, download main.js, manifest.json, and styles.css from the matching GitHub Release. Place them in <your-vault>/.obsidian/plugins/centerline/, then enable Centerline under Settings > Community plugins.