[Obs#42] Buttons外掛 0.4.5 新功能

1. Button Maker: 快速建立按鈕的GUI

  • 按〔Ctrl+P〕/〔Cmd+P〕,輸入Buttons,點擊【Buttons: Button Maker】
  • 結尾的倒引號下一行加上區塊代碼,以方便引用

```button
name Open Settings
type command
action 開啟設定
color red
```
^button-settings

```button
name Open Command Palette
type command
action 開啟命令面板
color blue
```
^button-palette

```button
name 在檔案管理器顯示當前筆記
type command
action 在檔案管理器顯示當前筆記
```
^button-show-explorer

2. 行內按鈕 (Inline buttons)

  • 格式: 按鈕的區塊代碼
  • 按鈕本體可以定義在其他筆記

範例:常用命令

操作 按鈕
Open Settings `button-settings`
Open FileExplorer `button-show-current-file`

01

範例:動態查詢

查詢類別 執行 開啟結果
本日 `button-daily-new` `button-daily-changed` [[!query-today-new|本日建立]] [[!query-today-changed | 本日修改]]
本週 `button-weekly-new` `button-weekly-changed` [[!query-week-new|本週建立]] [[!query-week-changed|本週修改]]
`button-monthly-changed` `button-3months-changed`
button-yearly-changed

02

3. 用樣板建立動態檔名

  • split參數開啟到新面板
```button
name 查詢今天修改
type note(!daily-<% tp.date.now("YYYYMMDD") %>,split) template
action template-query-daily-changed
templater true
```
^button-daily-note

```button
name Swap
swap [settings,command]
color red
```
^button-swap1

4. Swap button只能用inline按鈕調用

button-swap1

教學影片

##

您可能也會有興趣的類似文章

簡睿

服務於軟體業的資訊老兵。興趣廣泛,學習力佳,樂於分享所知所學。

您可能也會喜歡…

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *