Another Quick Switcher

approved

by tadashi-aikawa

Another choice of Quick switcher.

381 stars137,369 downloadsUpdated 8d agoMIT
View on GitHub

Obsidian Another Quick Switcher Plugin

release Ask DeepWiki Tests downloads

This is an Obsidian plugin which is another choice of Quick switcher. It offers various features, such as:

⏬ Install

You can download from Community plugins in Obsidian settings.

⌨️ Features

1. Custom searches

Demo

Custom searches enables you to create your original search commands. Search command settings are saved automatically when you finish editing (no Save button required).

Demo

Search target

NameDescription
fileAll files in the Vault
backlinkMarkdown files that link to the current file
linkFiles linked from the current file
2-hop-link2-hop links from the current file
opened fileFiles currently open in the window

Sort priorities

You can use the following names as a Sort priorities.

NameDescriptionSince
Perfect word matchMatches an exact word in the file name6.0.0
Prefix name matchMatches when the file name or alias starts with the query6.0.0
Name matchMatches when the file name or alias contains the query6.0.0
Fuzzy name matchFuzzy matches the file name or alias8.10.0
Tag matchMatches when the query includes a tag name6.0.0
Header matchMatches when the query includes a header name6.0.0
Link matchMatches when the query includes an internal link name6.0.0
Property matchMatches when the query includes a property name11.0.0
LengthOrders by file name or alias length6.0.0
Last openedOrders by most recently opened6.0.0
Last modifiedOrders by most recently modified6.0.0
StarOrders starred files first6.0.0
AlphabeticalOrders by file name or alias (A-Z)6.2.0
Alphabetical reverseOrders by file name or alias (Z-A)7.0.0
Created latestOrders by newest creation date7.0.0
Created earliestOrders by oldest creation date7.0.0
(Tags split by comma)Prioritizes files with the specified tags7.0.0
(Extensions split by comma)Prioritizes files with the specified extensions8.3.0
(Property and sort order)Orders by front matter property value13.27.0

Note Use (Tags split by comma) like #hoge or #hoge,#huga.

Note Use (Extensions split by comma) like .md or .md,.canvas.

Note Use (Property) like @<property> (@<property>:asc) or @<property>:desc for descending order. For arrays, the first element is used; missing values sort last.

Relative updated period display

You can show the relative updated period in suggestions. Configure it per search command.

  • Select the source in Relative updated period source (do not show / last modified / created time / property)
  • When using Property, set the front matter key in Property key for relative updated period

Preset search commands

Recent search recent search
File name search file name search
File name fuzzy search file name fuzzy search
Landmark search landmark search
Star search star search
2 hop link search 2 hop link search

Note

Queries enclosed in double quotes are searched as is
  • "ho ge" matches only ho ge and does not match hoge.
  • ho ge matches both ho ge and hoge.
  • Use \" to search for literal quote characters.
A minus sign at the beginning excludes matched candidates

Example: Suppose there are three files:

  • hoge.md
  • hoge
  • mdhoge

The input hoge -md will suggest only hoge.

Additionally, you can specify a custom string as the exclude prefix using the Exclude prefix setting.

@key:value or @key: searches by front matter property
  • @status:done matches files whose status property contains done.
  • @status: matches files whose status property has a non-null value set.
  • Combine with other queries: keyword @status:done matches files whose name contains keyword AND whose status is done.
  • Combine with exclusion: @status: -@status:done matches files that have a status value but it does NOT contain done.

Note Front matter must be loaded for this to work (e.g., enable Search by property or Show front matter in the search command settings).

<cd> means the current directory

If the path of the active file is "/usr/local/vault/notes", the query "<cd> obsidian" will be interpreted as "/usr/local/vault/notes obsidian".

2. Header floating search in file / Header search in file

Demo

  • Show all headers even after filtering to retain file structures in the brain
  • Jump to the first hit suggestion automatically and move next/previous by Tab/Shift+Tab as default
  • Queries enclosed in double quotes are searched as is
    • "ho ge" only matches ho ge not hoge
    • ho ge matches both ho ge and hoge
    • Use \" to search for literal quote characters

If you want to show heading level labels (H1/H2, etc.) instead of bullets in header search, you can do so with CSS.

CSS: Show heading level labels (H1-H6)
.another-quick-switcher__item__title__header {
  list-style: none;
}
.another-quick-switcher__item__title__header::before {
  padding-right: 5px;
  font-weight: bold;
  color: darkcyan;
  opacity: 0.4;
}
.another-quick-switcher__item__title__header1::before {
  content: "H1";
}
.another-quick-switcher__item__title__header2::before {
  content: "H2";
}
.another-quick-switcher__item__title__header3::before {
  content: "H3";
}
.another-quick-switcher__item__title__header4::before {
  content: "H4";
}
.another-quick-switcher__item__title__header5::before {
  content: "H5";
}
.another-quick-switcher__item__title__header6::before {
  content: "H6";
}

3. Grep

This feature requires ripgrep and set the executable command to "Ripgrep command" option.

Demo

It sorts results by modified time descending.

Additional hotkeys

CommandDescriptionDefault Hotkey
SearchExecute searchTAB
PreviewPreview selected fileCtrl+,
Toggle input focusSwitch focus between search query and path input(customizable)
Previous search historyMove to the previous query in history(customizable)
Next search historyMove to the next query in history(customizable)
Clear inputClear the search query input(customizable)
Clear pathClear the path input(customizable)
Set ./ to pathSet current directory to path input(customizable)

Note: If you want to search in real-time, please set the "Grep search delay milli-seconds" option to 1 or more.

Launch Grep from Quick Switcher

You can launch the Grep dialog directly from the main Quick Switcher with the current query carried over. This allows for seamless transition from file searching to content searching.

  • Configure the hotkey for "launch grep" in the main dialog settings
  • The current search query will be automatically transferred to the Grep dialog

Note

  • Input regards as a regex pattern
  • Grep searches only markdown files as default. If you want to search for other extensions, please update the "Grep > Extensions" settings
  • If you want to include file names in the search, enable the "Include file name in search" setting
  • Space-separated terms are searched with AND logic (e.g., hello world finds content containing both "hello" and "world")

4. Customizable hotkeys

Detailed hotkeys customization is available for each dialog.

Demo

5. Backlink search

The new Backlink search enables displaying all occurrences in the same file and listing the corresponding lines' text.

https://github.com/tadashi-aikawa/obsidian-another-quick-switcher/assets/9500018/0ce0111a-7481-40a0-a49e-ab00a2f37b35

6. Link search

The new Link search enables displaying all occurrences in the same file and listing the corresponding lines' text.

https://github.com/tadashi-aikawa/obsidian-another-quick-switcher/assets/9500018/b31034e7-7ad7-4ab5-8294-6b4950efe224

7. In file search

"In File search" allows you to search for a specific line within a file using a search keyword and displays it along with the surrounding lines.

  • Queries enclosed in double quotes are searched as is
    • "hello world" only matches hello world not lines containing both hello and world separately
    • hello world matches lines containing both hello and world anywhere in the line
    • Use \" to search for literal quote characters (e.g., search \"quote finds search "quote)

Additional Features

  • Insert to Editor: You can insert the selected line directly into the current editor at the cursor position using the configurable "insert to editor" hotkey

https://github.com/tadashi-aikawa/obsidian-another-quick-switcher/assets/9500018/0b16c4f4-b071-4e05-9402-00ae2525e57c

8. Show backlinks from the dialog

You can show the backlinks about the suggestion in the dialog. (Default hotkey is Mod h)

It can show backlinks from not only existing notes but also phantom(not existing) notes.

Demo

9. Navigate outgoing/backlinks without leaving the dialog

You can navigate outgoing/backlinks without leaving the dialog by using the "show links", "show backlinks", "navigate forward", and "navigate back" commands.

Demo

10. Preview

You can preview the file without closing the dialog. (Default hotkey is Mod ,)

While previewing, you can scroll the note with scroll preview up / scroll preview down (hotkeys are configurable). It also responds to scrolling from pointing devices.

It shows a floating view that doesn't distract the contents. Additionally, it makes the editor state before opening the dialog after previewing files and closing the dialog.

https://user-images.githubusercontent.com/9500018/216806330-daf57b52-d8a4-42e3-9803-ba7d76a93319.mp4

Auto Preview

Auto Preview shows a preview automatically as you move the selection, without manually triggering Preview.

DialogAuto preview on selectionDelay settingToggle commandNotes
Main dialog (search commands)Yes (per command)YesYes (toggle auto preview)Configured per search command
Grep dialogYesYesNoEnable in settings
Backlink dialogYesYesNoEnable in settings
Header dialogYesNoYes (toggle auto preview)Auto preview uses floating mode
Link dialogYesNoYes (toggle auto preview)Auto preview uses floating mode
In File dialogYesNoYes (toggle auto preview)Auto preview uses floating mode

Settings reference (UI labels):

  • Main dialog (search commands): Auto preview, Auto preview delay milli-seconds
  • Grep dialog: Auto preview, Auto preview delay milli-seconds
  • Backlink dialog: Auto preview, Auto preview delay milli-seconds
  • Header dialog: Auto preview in the floating mode
  • Link dialog: Auto preview in the floating mode
  • In File dialog: Auto preview in the floating mode
🎥 Demo movie (YouTube)👇

YouTube Video i8b6pHrhIb4

11. Move file to another folder

The "Move file to another folder" command allows you to quickly move the current file to a different folder with enhanced sorting capabilities and smart search features.

Search Features

  • Fuzzy Search: Find folders even with partial or out-of-order characters (e.g., "proj" matches "Projects")
  • Highlighted Matches: Search terms are highlighted in both folder names and directory paths
  • Multiple Match Types: Supports prefix matching, substring matching, and fuzzy matching
  • Vault root entry: The vault root appears as <VAULT_ROOT> so you can move files directly to the root

Folder Sort Options

OptionDescription
Recently usedFolders you've recently moved files to appear at the top
AlphabeticalSort folders alphabetically (A-Z)
Alphabetical reverseSort folders in reverse alphabetical order (Z-A)

Settings

SettingDescriptionDefault
Folder sort priorityChoose how folders are sorted in the move dialogRecently used
Recently used folders file pathCustomize where the folder usage history is stored*(auto)
Max recently used foldersMaximum number of recently used folders to remember10 (range: 5-50)
Exclude prefix path patternsExclude certain folder paths from appearing in the move dialog(none)

* When left empty, defaults to .obsidian/plugins/obsidian-another-quick-switcher/recently-used-folders.json

Features

  • Recently used folder tracking: The plugin remembers which folders you've used recently and prioritizes them
  • Persistent history: Recently used folder history is stored in your vault and syncs across devices
  • Configurable storage: Customize where the folder usage history is stored within your vault

12. Check/Uncheck items (multi-select)

You can multi-select suggestions in the main Quick Switcher, Backlink search, and Grep.

  • Toggle selection: use the configurable hotkeys "check/uncheck" or "check/uncheck and next" (moves the cursor to the next item).
  • Select all / Clear all: use "check/uncheck all" (toggles all) or "uncheck all" hotkeys (configurable).
  • Checked-count badge: shows how many items are checked next to the input while using multi-select.
  • Visual cue: checked items show a left accent bar in the list.
  • Batch actions: when items are checked, actions like Open will apply to all checked items. For example, Open opens all checked targets in new tabs; other supported actions (e.g., close if opened, open in default app, show in system explorer) also work for checked items.
🎥 Demo movie (YouTube)👇

YouTube Video IPHZu87sd2w

Tip: Assign convenient keys in Settings to quickly mark a range (e.g., bind "check/uncheck and next").

Setting

13. Command palette

Another Quick Switcher bundles its own command palette dialog so you can search and execute Obsidian commands with the same fast scoring model and dialog hotkeys.

  • The palette remembers every command you run and surfaces recently used commands with a history badge
  • It also records which command you picked for the current query and marks that command as "top priority" the next time you type the same query
  • Use the copy command id hotkey to quickly grab an internal command ID for automation or scripting

https://github.com/user-attachments/assets/eb2bf1bc-08b8-4084-b4b7-450d737b8e95

History storage

SettingDescriptionDefault
History mapping file pathVault-relative path for the JSON file that stores last used commands and per-query favorites.obsidian/plugins/obsidian-another-quick-switcher/command-history.json
Max history retention daysRemove entries from the history when a command hasn't been run within this many days (0 = keep all)10

⌘ Dialog Commands

Below are dialog-specific command tables with default keybindings.

The MC column indicates multi-check support: "✅" applies to all checked items, "⛔" affects only the current selection, and "-" is not applicable (e.g., toggle commands).

Main dialog

CommandDefault KeybindingMC
openEnter
open in new tabMod+Enter
open in new pane (horizontal)Mod+-
open in new pane (vertical)Mod+i
open in new windowMod+o
open in popup(none)
previewMod+,
toggle auto preview(none)-
scroll preview up(none)
scroll preview down(none)
createShift+Enter
create in new tabMod+Shift+Enter
create in new pane (horizontal)(none)
create in new pane (vertical)(none)
create in new windowMod+Shift+o
create in new popup(none)
check/uncheck(none)-
check/uncheck and next(none)-
check/uncheck all(none)-
uncheck all(none)-
insert to editorAlt+Enter
open in default app(none)
show in system explorer(none)
open in googleMod+g
open first URLMod+]
close if opened(none)
show linksMod+l
show backlinksMod+h
show all resultsShift+Alt+a
navigate backAlt+ArrowLeft
navigate forwardAlt+ArrowRight
previous search history(none)
next search history(none)
launch grep(none)
copy file vault path(none)
copy absolute file path(none)
upMod+p
downMod+n
clear inputMod+d
replace inputTab
dismissEscape

Folder dialog

CommandDefault KeybindingMC
upMod+p
downMod+n
open in default app(none)
dismissEscape

Header dialog

CommandDefault KeybindingMC
upMod+p
downMod+n
move to headerEnter
clear inputMod+d
move to next hitTab
move to previous hitShift+Tab
toggle auto previewMod+,
scroll preview up(none)
scroll preview down(none)
insert all to editorAlt+Shift+Enter
dismissEscape

Backlink dialog

CommandDefault KeybindingMC
openEnter
open in new tabMod+Enter
open in new pane (horizontal)Mod+-
open in new pane (vertical)Mod+i
open in new windowMod+o
open in popup(none)
check/uncheck(none)-
check/uncheck and next(none)-
check/uncheck all(none)-
uncheck all(none)-
show all resultsShift+Alt+a
previewMod+,
scroll preview up(none)
scroll preview down(none)
upMod+p
downMod+n
dismissEscape

Link dialog

CommandDefault KeybindingMC
openEnter
open in new tabMod+Enter
open in new pane (horizontal)Mod+-
open in new pane (vertical)Mod+i
open in new windowMod+o
open in popup(none)
show all resultsShift+Alt+a
previewMod+,
toggle auto preview(none)-
scroll preview up(none)
scroll preview down(none)
upMod+p
downMod+n
dismissEscape

In File dialog

CommandDefault KeybindingMC
upMod+p
downMod+n
insert to editor(none)
show all resultsShift+Alt+a
toggle auto previewMod+,
scroll preview up(none)
scroll preview down(none)
dismissEscape

Grep dialog

CommandDefault KeybindingMC
openEnter
open in new tabMod+Enter
open in new pane (horizontal)Mod+-
open in new pane (vertical)Mod+i
open in new windowMod+o
open in popup(none)
check/uncheck(none)-
check/uncheck and next(none)-
check/uncheck all(none)-
uncheck all(none)-
previewMod+,
scroll preview up(none)
scroll preview down(none)
clear inputMod+d
clear pathAlt+d
set ./ to pathAlt+c
toggle input(none)
previous search history(none)
next search history(none)
upMod+p
downMod+n
searchTab
dismissEscape

Command palette

CommandDefault KeybindingMC
upMod+p
downMod+n
copy command id(none)
dismissEscape

💥 Major Breaking Changes

For users who use earlier than v14.0.0

The following commands were removed to avoid conflicts with preview:

  • open in new tab in background
  • open all in new tabs
  • insert to editor in background
  • insert all to editor

The first two were removed from the main/backlink/link/grep dialogs; the last two were removed from the main dialog.

Alternatives with multi-select:

  • open in new tab in background -> use check/uncheck for multiple selection and run open
  • open all in new tabs -> use check/uncheck all to select all and run open
  • insert to editor in background -> use check/uncheck for multiple selection and run insert to editor
  • insert all to editor -> use check/uncheck all to select all and run insert to editor
🎥 Demo movie (YouTube)👇

YouTube Video sxDEMQq8txc

For users who use earlier than v13.0.0

In v13, we removed Link search from Preset search commands. Please see #275 for details about this decision. If you need the previous Link search functionality, you can add it to Search commands with the configuration shown in the image below.

Open "Link search" configuration link search

For users who use earlier than v8.0.0

Please read a "🔥 Breaking changes" section in the Release note.

For users who use earlier than v7.0.0

Please read a "🔥 Breaking changes" section in the Release note.

For users who use earlier than v6.0.0

Please read a "🔥 Breaking changes" section in the Release note.

📱 Mobile support

It both supports desktop and mobile.

[!NOTE] Please note that I am not currently using the mobile version of Obsidian, so I cannot verify this issue myself. As a result, addressing this bug will have a low priority.

💬 Feature requests / Bugs

Please create a new issue.


🔌 API (Experimental)

Another Quick Switcher provides a public API that allows external scripts (e.g., Templater) to programmatically open the file picker dialog and retrieve the selected file(s).

Usage

// Get the plugin instance
const aqs = app.plugins.plugins["obsidian-another-quick-switcher"];

// Open the file picker with a specific search command
const files = await aqs.api.pickFile("Recent search");

if (files) {
  // files is TFile[] - array of selected files
  // Single selection returns array with one element
  // Multi-selection (check/uncheck) returns array with multiple elements
  console.log(files.map((f) => f.path));
} else {
  // User cancelled the dialog
}

API Reference

api.pickFile(commandName: string): Promise<TFile[] | null>

Opens the file picker dialog with the specified search command and returns the selected file(s).

Parameters:

  • commandName - The name of the search command to use (e.g., "Recent search", "File name search"). This must match a command name defined in Another Quick Switcher settings.
  • option - Optional parameters:
    • query: An initial search query to pre-fill in the dialog's input box.

Returns:

  • Promise<TFile[]> - Array of selected files when file(s) are selected
  • Promise<null> - When the dialog is cancelled

Throws:

  • Error - If the specified command name is not found in settings

api.getAvailableCommandNames(): string[]

Returns the list of available search command names that can be used with pickFile().

Example with Templater

<%*
const aqs = app.plugins.plugins['obsidian-another-quick-switcher'];
const files = await aqs.api.pickFile("File name search");

if (files && files.length > 0) {
  const file = files[0];
  tR += `[[${file.basename}]]`;
}
%>

Note This API is experimental and may change in future versions.


🖥️ For developers / contributors

Pull requests

Sorry, I would not accept the pull requests except for the following cases.

  1. Fix obvious bugs
  2. Fix typo or wrong documentation
  3. If I ask for it in the GitHub issues or the discussions

Development

Set up

git config core.hooksPath hooks

Install dependencies

Bun is required.

bun install --frozen-lockfile --ignore-scripts
bun dev

Release

Run Release Action manually.

📜 Appendix

What is the "2-hop-link"?

2-hop-link are outgoing links in the current file, and files that have outgoing links to them.

For example, If there are relations as follows,

flowchart LR
    D[Dog] --> A[Animal]
    C[Cat] --> A
    O[Owl] --> A

2-hop-link from the "Dog" is as follows.

flowchart LR
    D[Dog]:::focus --> A[Animal]
    D[Dog]:::focus --> C[Cat]
    D[Dog]:::focus --> O[Owl]

    classDef focus fill:#f96

More complicated example.

flowchart LR
    Dog:::focus --> Animal
    Dog --> Masaru
    Zagitova --> Masaru
    Masaru --> Akita-inu
    Cat --> Animal
    Owl --> Animal
    Tama --> Cat
    Mike --> Cat
    Animal --> Zoo
    Zoo --> Animal
    Mahjong --> Zoo
    Animal --> Coffee
    classDef focus fill:#f96

2-hop-link from the "Dog" is as follows.

flowchart LR
    Dog:::focus --> Animal:::focus
    Dog --> Masaru:::focus
    Zagitova:::focus --> Masaru
    Masaru --> Akita-inu
    Cat:::focus --> Animal
    Owl:::focus --> Animal
    Tama --> Cat
    Mike --> Cat
    Animal --> Zoo
    Zoo:::focus --> Animal
    Mahjong --> Zoo
    Animal --> Coffee
    classDef focus fill:#f96

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.