2023年, Obsidian完全可以替代Typora了

2023年, Obsidian完全可以替代Typora了

Typora

缺点

  • macos+intel, Typora在所见所得的模式下, 只要内容一多, 就会开始卡顿,切换到源码模式就不卡了
    搜了下, 可能是自带WebKit的原因

  • typora会在换行时插入空白行, 类似的还有渲染时会忽略一些格式, 导致你在预览模式下是正常的, 但发布到博客, 或者用vscode打开, 会发现很多格式不规范, 例如缩进 换行 对齐

  • 免费版停止在0.98, 不会有新功能, arch上安装旧版本也比较麻烦

优点

  • 表格非常好用

  • 和picgo整合的图片上传功能非常好用

Obsidian

优点

  • 免费

  • 所见所得模式下比Typora流畅多了

  • 有丰富的插件市场

  • 双链(我没用这功能)

  • 把整个文件夹同步(例如放到onedrive里), 配置也跟着同步

  • 多窗口, 多标签模式

缺点

  • 像vscode一样, 如果是从Typora迁移过来, 默认初始配置会觉得不顺手

  • 市场插件太多了, 有点难挑

插件

可以看下开发者的文章 两年后,我还在用的 Obsidian 插件

说下我自己在用的:

  • Auto Link Title: 粘贴链接时自动获取网页标题

  • Clear Unused Images Collapse All: 自动清除不再使用的图片

  • Commander: 添加快捷图标, 点击时使用指定命令

  • Easy Typing: 格式化类

  • Excalidraw: 画图, 类似draw, 手绘风

  • Hider: 隐藏不需要的菜单

  • Hover Editor: 悬浮窗口模式

  • Icon Folder: 给文件夹或者文件添加图标

  • Image auto upload Plugin Local Images Plus: 类似typora结合picgo上传图片

  • Obsidian42 - BRAT: 安装非官方市场插件

  • Pandoc Plugin: 导出其他格式

  • Quiet Outline: 大纲

  • Recent Files: 最近打开的文件

  • Table Enhancer: 表格增强(终于接近typora了)

主题

当然是类似Typora的 Typora-vue

顺便改下, 把h标签hover选择器去掉, 把颜色改成高亮颜色, 让它常驻

1
.markdown-preview-view h1::before

自定义css

给outline 添加数字序号

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
/* container of first layer headings. */
.outline {
  counter-reset: rootCounter;
}

.outline .tree-item .tree-item-self .tree-item-inner::before {
  content: counters(rootCounter, ".") ". ";
  counter-increment: rootCounter;
}

/* container of the ohter headings. */
/* NOTE: It is not .outline anymore. So we need a new counter */
.outline .tree-item-children {
  counter-reset: innerCounter;
}

.outline .tree-item-children .tree-item .tree-item-self .tree-item-inner::before {
  content: counters(rootCounter, ".") "." counters(innerCounter, ".") ". ";
  counter-increment: innerCounter;
}

长这个样子

Built with Hugo
Theme Stack designed by Jimmy