今年はここまでか。
Cardy
カンバン表示でフリーライティング。 この書き方が面白いので安定版にしようと苦心しています。
カンバン表示がコマンドだと止まるので「別のタブに開く」に書き換えてみました。
<%* const style = ".kanban-plugin__board{background:#eee;}.kanban-plugin__lane-wrapper{margin-right:10px;}.kanban-plugin__lane-wrapper div{background: #fff;border:0;border-radius:5px;}.kanban-plugin__lane-grip{color:orange;}.kanban-plugin__item-wrapper{margin:0;}.kanban-plugin__item{border-bottom:1px solid #eee !important;border-radius:0 !important;}" s = tp.file.content d = document.getElementById("Cardy") if(d){ s = s.replace(/^---\n[\s\S\n]+\n---\n\n/, "") s = s.replace(/%% kanban:settings\n[\s\S\n]+\n%%/, "") s = s.replace(/^- \[.\] /mg, "") s = s.replace(/##+ \n+/, "") s = s.replace(/^##+ /mg, "#### ") s = s.replace(/\n\n+/g, "\n\n") d.remove() }else{ s = s.replace(/^([^#])/mg, "- [ ] $1") s = "---\nkanban-plugin: basic\n---\n\n#### \n" + s e = document.createElement("style") e.id = "Cardy" document.body.appendChild(e).innerHTML = style } e = app.workspace.activeLeaf.view.editor await e.setValue(s) await app.workspace.activeLeaf.rebuildView() s = "workspace:toggle-pin" app.commands.executeCommandById(s) s = "obsidian://open?file=" + encodeURIComponent(tp.file.title) open(s) %>
ファイルにピンを打つことになるけど、これだと切り替えに詰まることがありません。
使い方
別のタブにカンバンが表示されます。 そちらで編集しても元のファイルに変更が反映するので、カンバンの方は閉じるだけ。 モードを切り替えなくていい。
元ファイルでCardyを再実行するとピンが外れ平文に戻ります。
設定
Kanbanプラグインの List width を 680 にしてみました。
見開きは「見るためのもの」であって「書くためのもの」ではありません。 カードの幅には何かアフォーダンスがあるようで、狭くすると「書き加えたい」という欲求が湧いてこない。 完成品を眺めている気分になり「書いていく」という行為を引き出さない。
幅を広げると「エディタ」の側面が現れてきます。 「この段落」が前面に出てくる。 不思議ですね。 普段見ている箇条書きに近いからでしょうか。 これなら抵抗なく文章を書き綴ることができます。
まとめ
下書きからでもカンバンは使えそう。