Tag Search (rookie)

approvedunreviewed

by Revulo

Update, search, and manage inline and frontmatter tags in your notes, with vault-wide and file-name searches.

Updated todayMIT

Tag Search (rookie)

Ports five tag-related features from the Neovim plugin rookie_tag.nvim to Obsidian.

Features and commands

Open the command palette (Ctrl/Cmd + P) and search for a command name:

Commandnvim equivalentDefault key (nvim)Description
Update tags on current line:RookieTagUpdate<leader>faMerge the #tags on the current line with the tags you enter, then deduplicate, sort, and rewrite the line
Search tags in current note:RookieTagSearch<leader>ffFind lines in the current note that contain all entered tags (AND)
Search tags across vault:RookieTagSearchGlobal<leader>FFRun the same AND search across every Markdown note in the vault
Add tags to current file name:RookieTagAddFileName<leader>FaSplit the file name on -, merge with the entered tags, deduplicate, sort, and rename the file
Search files by name tags:RookieTagSearchFileName<leader>FfCase-insensitive AND substring search on file names
Go to next tag search resultNew—Jump to the next result (wraps across notes)
Go to previous tag search resultNew—Jump to the previous result (wraps across notes)

Enter tags separated by spaces (for example project pending); the leading # is optional. Obsidian does not allow plugins to ship default hotkeys, so bind the commands yourself under Settings → Hotkeys; Alt+↓ / Alt+↑ are suggested for the navigation commands.

Search results appear in the Tag Search sidebar view (the equivalent of the quickfix window). Click a result to open its note and jump to the matching line; when there is only one result, the jump happens automatically. The Clear button empties the result list. The previous/next commands cycle through the results in order and highlight the current one; if there are no results you will be prompted to run a search first.

Differences from the nvim version

  • Tag sources include both inline #tag and YAML frontmatter tags: (arrays, strings, or a, b); frontmatter is shown as a separate result that jumps to the properties section.
  • Tag characters are extended to Obsidian's letters, digits, _, -, and nested / (the nvim version only matches %w).
  • Tag comparison is case-insensitive and matches whole tags; file-name search uses the basename without its extension.
  • Current-note search requires # at the start of the line (as in nvim); vault-wide search allows tags anywhere in the line (matching nvim's rg behaviour).
  • Vault-wide search reads files through the Obsidian API instead of rg, so it works on mobile.

Installation

  1. Run npm install and npm run build to produce main.js in the project root.
  2. Copy main.js, manifest.json, and styles.css into <vault>/.obsidian/plugins/tag-search-rookie/.
  3. Reload Obsidian and enable the plugin.

Development

npm install
npm run typecheck   # TypeScript check
npm run dev         # watch build
npm run build       # production build

License

See LICENSE.

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.