Base Source Editor: Edit the YAML source of a Base within Obsidian

Disclaimer

Is this plugin open source? Yes
Is this plugin completely free? Yes
Is this plugin vibe-coded beyond the author’s ability to comprehend how it works? No
Community Directory: Link


Base Source Editor

Inspired by this feature request and a combination of my own impatience and strong appreciation for Obsidian and its community, I’ve published my first plugin - Base Source Editor.

Base Source Editor adds a Base Source mode for .base files, so you can read and edit the raw YAML source directly in the Obsidian app - particularly handy for use on mobile.

Usage

Open any Base, then switch between ‘Bases’ view and ‘Base Source mode’ using either:

  • the Source mode / Base mode toggle visible when the Base is open, similar to the ‘Source mode/Reading mode’ toggle for Markdown notes, or
  • the Toggle source mode command in the Command palette (you can give it a hotkey for quick switching).

Features

  • Full mobile support.
  • Theme-aware syntax highlighting.
  • Search & replace, mirroring Obsidian’s native behaviour. Supports case-sensitive search.
    • The search/replace command is accessed the same way as for native Markdown notes, either from the Command palette or the file menu.

Settings

  • Custom font size, independent of Obsidian’s own setting.
  • Line wrapping and readable line length.
  • Indentation guides, with an optional custom colour and opacity.
  • Render whitespace characters.

Some additional background: I’m far from being an experienced developer. I got my toes wet with Dataview and Templater, and moved onto building a plugin for personal use that adds some functionality and tweaks to enhance my own Obsidian experience.

I’ve been working on that for a little over a year, and decided it’s time to try putting something out there for others to enjoy.

I’m committed to ensuring this plugin meets the same standard of quality user experience provided by the core Obsidian app. I hope the community finds this useful, and if you’d like to provide any feedback or contributions to further improve what the plugin offers, contributions and comments are welcome.

1 Like

I’ve only been using this plugin for a few days, and it already feels absolutely essential to my workflow and easily one of the plugins I’d make sure to install from day 1 on any new vault. Thanks so much for this.

1 Like

Thank you! I’m so glad you find this useful.

New release: 0.5.5

This release adds a feature essential to the editing experience for mobile users - a mobile command toolbar.

The mobile toolbar appears when editing a Base in Base Source mode, and behaves the same as Obsidian’s native mobile toolbar.

This toolbar is configured separately to the native toolbar, and only includes editor commands that make sense in the context of editing YAML.

New release: 0.7.0

Autocompletion is now… complete!

This release brings rich autocompletion to the Base Source Editor.

The autocompletion offers suggestions for:

  • Keys
    • Top-level keys: filters, formulas, properties, summaries, views.
    • Keys inside a view: type, name, filters, order, sort, groupBy, limit, summaries, plus the options of that view’s type.
  • Values
    • View types (View types added by other plugins are included)
    • View options
    • Summaries
  • Properties
    • Note properties from your vault, file properties (file.name, file.folder, …) and formulas defined within the Base.
  • Formulas
    • Formulas in the top-level summaries section now get suggestions and function hints, using values.

Activate autocompletion by:

  • Pressing Ctrl+Space on an empty formula value to see suggestions
  • Using the Show suggestions command from the command palette, or the mobile toolbar.