Demo: 命令菜单 — 搜索条目文本,以及执行太微中的命令。美观大方的多合一搜索框和快捷指令中心。
Github: GitHub - tiddly-gittly/tw-command-palette: Command palette Chinese translated
CPL: TW-CPL — 太微插件聚合中心
This plugin references the design of Souk21/TW-commandpalette, thanks to him for making the first version! This plugin upgrades and is written with TypeScript and algolia/autocomplete, make it much more powerful and friendly to developers to extend its functionality.
Use ctrl+P to open it, and search your titles and texts.
Or Use ctrl+tab to switch between recently used tiddlers
Hold ctrl, and press tab again to go down, like in the browser or VSCode.
use ctrl+shift+P to open commands list (or by adding prefix $
)
You can search tiddlers with tags like $:/tags/Actions
$:/tags/Messages
and execute them. Add your tiddlers with these tags to show them in the list. Some example commands:
caption: <<lingo ShowControlPanel $:/plugins/linonetwo/commandpalette/language/>>
tags: $:/tags/Actions
title: $:/plugins/linonetwo/commandpalette/Show Control Panel
<$action-navigate $to="$:/ControlPanel"/>
tags: $:/tags/Messages
caption: {{$:/language/Buttons/Edit/Caption}}
description: {{$:/language/Buttons/Edit/Hint}}
title: $:/plugins/linonetwo/commandpalette/Edit Tiddler
tm-edit-tiddler
use ctrl+P to open, and prefix with [
to use filters
Tiddlers with tag $:/tags/Filter
will show here. Including those from the tw core:
title: $:/core/Filters/Drafts
tags: $:/tags/Filter
filter: [has[draft.of]sort[title]]
description: {{$:/language/Filters/Drafts}}
Search is a two-step process, first search for a preset filter or a customized filter, enter to confirm the selection; then continue to search in the filter results, enter to open the tiddler.
In the second step, only user tiddlers are searched by default, and system tiddlers can be included by adding a prefix to the system entry search.
use ctrl+P to open, and prefix with #
to search tags
Simillar to filter feature above. Search tiddlers tagged with a certain tag.
prefix with ?
to see usage
So you don’t need to read this post!
Translation
If you find some translation mission on your wiki (while it works on my demo site), drag the $:/core/macros/lingo
from this site to your wiki: $:/core/macros/lingo , it is from feat: t macro and docs by linonetwo · Pull Request #7821 · Jermolene/TiddlyWiki5 · GitHub which is not yet merged into the core, but widely used in i18n plugins.
For Layout Developers
If you are writing a new layout, please add this to the layout, no empty line around {{$:/core/ui/CommandPaletteTemplate}}
, so it is transcluded as inline mode, not block mode! And with <$navigator
, it can be used as layout switcher, see How to navigate to a tiddler in default layout from a custom layout (when out of default layout widget tree) · Jermolene/TiddlyWiki5 · Discussion #8123 · GitHub .
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
{{$:/core/ui/CommandPaletteTemplate}}