最近尝试修复安装了一个叫做 claudian 的插件,也尝试只做了一个 obterminal 的插件。
本来没有问题。
如果有多个 vault,那么如果现在每个 vault 里面使用这些插件,那么需要一个一个安装。如果变更,也需要一个一个变更。当然,可以通过软连接的形式,减少重复操作。
但是,迭代思想一下,也许可以把 vault 的.obsidian目录拷贝出来,然后软链接到每个 vault 的下面。

试了一下,嗯,不错。

不过,也发现一个问题。
使用 notebook navigator 的时候,发现虽然各个 vault 加载的是一套.obsidian文件,但是效果还是不一样。

directories=("bak" "history" "jncsy" "life" "opkb" "opstory" "projects" "tmp" "zkzj" "books" "iiotops" "letv" "opschina" "others" "知识库")
for directory in "${directories[@]}"; do
cd $directory
rm -rf .obsidian
mkdir .obsidian
cd .obsidian
ln -s ~/code/tech/obsidian/.obsidian/plugins .
ln -s ~/code/tech/obsidian/.obsidian/themes .
ln -s ~/code/tech/obsidian/.obsidian/snippets .
ln -s ~/code/tech/obsidian/.obsidian/app.json .
ln -s ~/code/tech/obsidian/.obsidian/appearance.json .
ln -s ~/code/tech/obsidian/.obsidian/community-plugins.json .
ln -s ~/code/tech/obsidian/.obsidian/core-plugins.json .
cat <<'EOF'>workspace.json
{
  "main": {
    "id": "b4e4843314cdca83",
    "type": "split",
    "children": [
      {
        "id": "34ed12d5c41f5ec5",
        "type": "tabs",
        "children": [
          {
            "id": "f3aead2f25271fd8",
            "type": "leaf",
            "state": {
              "type": "markdown",
              "state": {
                "file": "2026/01/2026.01.07. 优雅使用.obsidian.md",
                "mode": "source",
                "source": false
              },
              "icon": "lucide-file",
              "title": "2026.01.07. 优雅使用.obsidian"
            }
          }
        ]
      }
    ],
    "direction": "vertical"
  },
  "left": {
    "id": "f7bef3ca55039517",
    "type": "split",
    "children": [
      {
        "id": "86f041e8f2d2938f",
        "type": "tabs",
        "children": [
          {
            "id": "9ffcf0b14430fd72",
            "type": "leaf",
            "state": {
              "type": "file-explorer",
              "state": {
                "sortOrder": "alphabetical",
                "autoReveal": false
              },
              "icon": "lucide-folder-closed",
              "title": "Files"
            }
          },
          {
            "id": "1e9240e8edd87ec3",
            "type": "leaf",
            "state": {
              "type": "search",
              "state": {
                "query": "",
                "matchingCase": false,
                "explainSearch": false,
                "collapseAll": false,
                "extraContext": false,
                "sortOrder": "alphabetical"
              },
              "icon": "lucide-search",
              "title": "Search"
            }
          },
          {
            "id": "9ae8342c8c49b43e",
            "type": "leaf",
            "state": {
              "type": "bookmarks",
              "state": {},
              "icon": "lucide-bookmark",
              "title": "Bookmarks"
            }
          },
          {
            "id": "162109cde0c60462",
            "type": "leaf",
            "state": {
              "type": "notebook-navigator",
              "state": {},
              "icon": "notebook",
              "title": "Notebook Navigator"
            }
          }
        ],
        "currentTab": 3
      }
    ],
    "direction": "horizontal",
    "width": 546.5
  },
  "right": {
    "id": "549ec98bd5eb3e73",
    "type": "split",
    "children": [
      {
        "id": "b39a1c17236fcbe5",
        "type": "tabs",
        "children": [
          {
            "id": "09fafc9e1dea9684",
            "type": "leaf",
            "state": {
              "type": "backlink",
              "state": {
                "file": "2026/01/2026.01.07. 优雅使用.obsidian.md",
                "collapseAll": false,
                "extraContext": false,
                "sortOrder": "alphabetical",
                "showSearch": false,
                "searchQuery": "",
                "backlinkCollapsed": false,
                "unlinkedCollapsed": true
              },
              "icon": "links-coming-in",
              "title": "Backlinks for 2026.01.07. 优雅使用.obsidian"
            }
          },
          {
            "id": "21d19476fe8e14b5",
            "type": "leaf",
            "state": {
              "type": "outgoing-link",
              "state": {
                "file": "2026/01/2026.01.07. 优雅使用.obsidian.md",
                "linksCollapsed": false,
                "unlinkedCollapsed": true
              },
              "icon": "links-going-out",
              "title": "Outgoing links from 2026.01.07. 优雅使用.obsidian"
            }
          },
          {
            "id": "ffb69c6d8f227a56",
            "type": "leaf",
            "state": {
              "type": "tag",
              "state": {
                "sortOrder": "frequency",
                "useHierarchy": true,
                "showSearch": false,
                "searchQuery": ""
              },
              "icon": "lucide-tags",
              "title": "Tags"
            }
          },
          {
            "id": "c76e9cc9417e5178",
            "type": "leaf",
            "state": {
              "type": "all-properties",
              "state": {
                "sortOrder": "frequency",
                "showSearch": false,
                "searchQuery": ""
              },
              "icon": "lucide-archive",
              "title": "All properties"
            }
          },
          {
            "id": "4731a8bd25620210",
            "type": "leaf",
            "state": {
              "type": "outline",
              "state": {
                "file": "2026/01/2026.01.07. 优雅使用.obsidian.md",
                "followCursor": false,
                "showSearch": false,
                "searchQuery": ""
              },
              "icon": "lucide-list",
              "title": "Outline of 2026.01.07. 优雅使用.obsidian"
            }
          },
          {
            "id": "86977bf60f715bfd",
            "type": "leaf",
            "state": {
              "type": "claudian-view",
              "state": {},
              "icon": "bot",
              "title": "Claudian"
            }
          }
        ],
        "currentTab": 5
      }
    ],
    "direction": "horizontal",
    "width": 300
  },
  "left-ribbon": {
    "hiddenItems": {
      "switcher:Open quick switcher": false,
      "graph:Open graph view": false,
      "canvas:Create new canvas": false,
      "daily-notes:Open today's daily note": false,
      "templates:Insert template": false,
      "command-palette:Open command palette": false,
      "bases:Create new base": false,
      "simple-terminal:Open Terminal": false,
      "obterminal:Open obterminal": false,
      "notebook-navigator:Notebook Navigator": false,
      "claudian:Open Claudian": false,
      "obsidian-excalidraw-plugin:New drawing": false
    }
  },
  "active": "86977bf60f715bfd",
  "lastOpenFiles": []
}
EOF
cd ..
cd ..
done
最后修改:2026 年 01 月 07 日
如果觉得我的文章对你有用,请随意赞赏