Base Source Editor

by fronglemog
5
4
3
2
1
Score: 52/100

Description

Category: Coding & Technical Tools

The Base Source Editor plugin adds a Base Source mode view for editing the YAML behind Base files directly as plain text. It keeps the work inside the app while exposing the source for direct changes. Search and replace follows the native Markdown note behaviour and includes case sensitive matching, with its command available from the command palette or file menu. YAML syntax highlighting adapts to the active theme through built in CSS variables. The view works on mobile as well as desktop. You can switch between Source mode and Base mode with the Toggle source mode command or the dedicated toggle shown whenever a Base is open.

Reviews

No reviews yet.

Stats

1
stars
2,566
downloads
0
forks
52
days
4
days
18
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
1
total issues
0
open issues
1
closed issues
216
commits

Latest Version

18 days ago

Changelog

What's new

Autocompletion

Autocompletion now available for keys, values, properties and formulas.

  • 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.
    • and, or and not under filters.
    • property and direction inside sort items and groupBy.
    • displayName under properties.
  • Values
    • View types, with their icons. View types added by other plugins are included.
    • View option values.
    • Sort directions (ASC, DESC)
    • Summary names: the built-in summaries for the property's type, and any custom summaries from the Base's top-level summaries.
  • Properties
    • Note properties from your vault, file properties (file.name, file.folder, ...) and formulas defined within the Base.
    • Suggested in order, sort, groupBy, and as keys under properties, a view's summaries and columnSize.
  • Formulas
    • Formulas in the top-level summaries section now get suggestions and function hints, using values.
    • Press Ctrl+Space on an empty formula value to see suggestions.

"Show suggestions" command

  • A new command that opens the suggestions at the cursor.
  • Assign it a hotkey, or add it to the mobile toolbar.

Autocompletion settings

New settings under Autocompletion → Autocompletion behaviour:

  • Accept suggestions using: Enter, Tab, or both.
  • When picking a key, insert:
    • Key and next line: for keys that hold other keys or a list, also adds a new, indented line, ready for the next item.
    • Key only: inserts just the key and : .
  • Offer suggestions after inserting a key: opens the suggestions again once a key has been inserted.

Changes

  • Autocompletion is now enabled on all devices by default, including phones.
    • The setting has been renamed, so your previous choice isn't carried over. If you had turned autocompletion off, turn it off again under Autocompletion.
  • The settings tab has been reorganised.

Fixes

  • The Base Source editor no longer breaks when it's moved into a pop-out window.
  • Suggestion popups and function hints are no longer cut off at the edges of the view.
  • With line wrapping off:
    • Text scrolled sideways no longer shows through the line numbers and side margins, and can't be clicked there.
    • The cursor stays clear of the line numbers and margins.
    • Dragging a mouse selection past the edge of the text scrolls the editor sideways.
  • Mobile: scrolling the editor no longer stops working on iOS when the text is scrolled sideways. Swiping from the edge to open a sidebar still works.
  • The search bar's keyboard shortcuts now ignores key presses while a different view is active.
  • Fixed a memory leak when formula autocompletion is initialised.

README file from

Github

Base Source Editor

An Obsidian plugin that adds a feature-rich text editor for editing the YAML source code of Bases.

Features

  • Text editor for .base files
    • Open a Base (.base file extension) in the Base Source Editor, and edit the raw YAML source code without leaving the Obsidian app.
    • Supports editor commands including:
      • Undo/redo
      • Indent/unindent
      • Move line up/down
      • Delete current line
  • Autocompletion
    • Suggests keys, values and formulas as you type.
    • Suggests property names from your vault, file properties, and the Base's own formulas.
    • Formula suggestions and function hints work the same as Obsidian's native formula editor.
    • Show suggestions at any time with Ctrl+Space, or with the Show suggestions command.
    • Choose which key accepts a suggestion: Enter, Tab, or both.
  • Syntax highlighting
    • Theme-aware YAML syntax highlighting, utilising Obsidian's built-in CSS variables.
  • Search & replace
    • Supports case-sensitive search.
  • Customisable appearance
    • Editor font size
    • Line wrapping and readable line length
    • Indentation guides
    • Rendering of whitespace characters (spaces, tabs)
  • Mobile command toolbar
    • Configurable command toolbar on mobile devices.

View the Roadmap to see planned features.

Installation

Requirements

  • Obsidian version: 1.14.4+
  • Bases core plugin must be enabled

Obsidian Community Directory

  1. Go to the plugin page on the Obsidian community directory.
  2. Click Add to Obsidian.

Inside Obsidian

  1. Open the community plugin browser inside Obsidian, and search for base source editor.
  2. Select the Base Source Editor plugin.
  3. Click Install.

Usage

A Base can be opened in the Base Source Editor by:

  • Using the command 'Toggle source mode' from the Command palette,
  • Using the 'Source mode/Base mode' toggle visible when a Base is open.

Developing

Requirements

  • Node.js: Version 24.22.2 or newer
  • pnpm: Version 12.14.0 or newer
  1. Clone this repo:

    git clone https://github.com/fronglemog/obsidian-base-source-editor-plugin
    cd obsidian-base-source-editor-plugin
    
  2. Install dependencies:

    pnpm install
    

Linting

pnpm run lint

Testing

pnpm run test

Building

New builds are created at build/main.js.

Command Type checks Minified Watches for changes
pnpm run build yes yes no
pnpm run build:nocheck no yes no
pnpm run build:nocheck:watch no yes yes
pnpm run dev no no (inline source map) no
pnpm run dev:watch no no (inline source map) yes

Installing a new build

Manual installation

After creating a new build, copy the build/main.js, styles/styles.css and manifest.json to .obsidian/plugins/base-source-editor in your Obsidian vault, and reload the Obsidian app.

Using installation script

After creating a new build, run this command (replace <VAULT_PATH> with the path to your Obsidian vault) and reload the Obsidian app.

[!WARNING] Before copying any files, the script looks for an .obsidian folder inside <VAULT_PATH> to determine if it's an Obsidian vault. The script will throw an error if it can't be found.

pnpm run copy-plugin-to-obsidian <VAULT_PATH>

For example:

  • pnpm run copy-plugin-to-obsidian "C:\Users\fronglemog\Documents\MyVault"
  • pnpm run copy-plugin-to-obsidian ~/Documents/MyVault

Contributing

I'm more than happy to accept feedback, issues, bug reports and pull requests.

AI policy

I use AI as a tool to support development. I welcome contributions or feedback from those who have done so with considered and appropriate use of AI.

However, AI slop is not welcome. Contributions 100% authored or submitted by AI agents are not welcome.

I reserve the right to decline, reject or otherwise ignore any contributions that I judge to be AI slop.

License

MIT © fronglemog

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Completr
5 years ago by tth05
Auto-completion plugin for the obsidian editor.
Toggle Meta Yaml
4 years ago by hua
Better MathJax
3 years ago by GreasyCat
Spellcheck Toggler
3 years ago by Julian Szachowicz
A plugin for Obsidian which gives you more control over the red-underline spellcheck behaviour.
Hemingway Mode
3 years ago by Joaquín Bernal
Select word
3 years ago by Connor Espino
Rich Text Editor Shortcuts
2 years ago by Joshua Wootonn
Create and toggle checkboxes, paste links wrapping your current selection, and toggle underline without leaving the keyboard.
Auto Correct Capitals Misspellings
2 years ago by Ummel
This plugin automatically corrects words where the first two letters are capitalized and the rest are lower case.
MetaEdit
5 years ago by Christian B. B. Houmann
MetaEdit for Obsidian
Linter
5 years ago by Victor Tao
An Obsidian plugin that formats and styles your notes with a focus on configurability and extensibility.
Editing Mode Hotkey
2 years ago by Signynt
Obsidian plugin to change the default editing mode (between Live Preview and Source) using a command or hotkey
AI Revisionist
2 years ago by Synaptic Labs
Pixel Perfect Image
2 years ago by Johan Sanneblad
Pixel perfect 100% image resizing, copy to clipboard, show image in Finder/Explorer, and much more.
Write Good
2 years ago by Mark Hesketh
Obsidian plugin to help improve writing style
Mode manager
2 years ago by dk949
Better management of reading/editing modes in obsidian
Quick Nav
2 years ago by exoticknight
Enhance your editing experience by unleashing the hidden power of shortcuts.
Duplicate line
2 years ago by Marcin Sztolcman
Plugin for Obsidian: duplicate current line, or selection.
Proofreader
2 years ago by pseudometa (aka Chris Grieser)
AI-based proofreading and stylistic improvements for your writing. Changes are inserted as suggestions directly in the editor, similar to suggested changes in word processing apps.
Regex Line Filter
a year ago by 64MM4-KN1F3
A note filtering plugin for Obsidian
YAML Table
a year ago by dainakai
DevOps Companion
a year ago by Jobelin Kom
Obsidian DevOps Companion is a developer-oriented plugin that brings DevOps context awareness directly inside your Obsidian vault.
Variant Editor
a year ago by Kunal Jain
Obsidian plugin to create variants
Maps
a year ago by Obsidian
Map layout for Obsidian Bases. Display your notes as an interactive map view.
Edit Link Alias
10 months ago by mnaoumov
Obsidian Plugin that adds edit link alias command.
Nova
9 months ago by Shawn Duggan
Nova - AI plugin for Obsidian that edits your documents directly through natural conversation. Stop copying from chat, start collaborating with AI.
Source Mode Styling
9 months ago by Chris Howard
Obsidian plugin. Provides a customisable raw look in source mode using a monospace font to clearly differentiate from Live Preview.
Table Line Break Mobile
9 months ago by marcelflymark
Obsidian plugin: Insert a new line break inside a table cell using the <br> HTML element
Frontmatter to HTML Attributes
8 months ago by Tarek Saier
Kanban Bases View
8 months ago by I. Welch Canavan
A kanban-style drag-and-drop custom view for Obsidian Bases that allows you to organize your notes into columns based on any property.
Negative Heading
8 months ago by Ashan Devine
Plugin for Adding Discord Style Negative Headings to Obsidian
Calendar Bases
8 months ago by Edrick Leong
Expand Selection
7 months ago by Alex Tait
Obsidian plugin to expand your editor selection to lines, sections (recursive), or the entire note
Feed Bases
6 months ago by edrickleong
Bases Charts
6 months ago by Moritz Jung
Base Board
6 months ago by mderazon
Kanban Plugin For Obsidian
Dragger
5 months ago by ariestar
An Obsidian plugin for dragging and rearranging any block.
TaskNotes
5 months ago by callumalpass
Task and time-tracking management with calendar integration for Obsidian
Markdown Tabs
4 months ago by xhuajin
Create and render a Tabs component in your notes.
Bases Paginator
4 months ago by sean2077
A plugin for Obsidian that adds a paginated table view with column filtering capabilities to Obsidian Bases.
Bases Toolbox
4 months ago by Grub Basket
Adds Quality of Life features to Obsidian Bases
Side-Notes
4 months ago by Fried Fishsticks
Tufte-style sidenotes for Obsidian
Power Bases
3 months ago by Power Plugins
Add board, calendar, timeline, chart, gallery, and table views to Bases, with inline editing, colors, rollups, field types, formulas, and CSV import.
Canvas Bases
3 months ago by callumalpass
Canvas-style layouts and JSON Canvas materialization for Obsidian Bases.
Gantt this
3 months ago by Altarok
Obsidian plugin showing multiple TTRPG calendars at once in one gantt chart.
Link Structure
3 months ago by Dmitry Fert
Obsidian plugin that adds a Structure view for Bases, displaying notes as a hierarchical tree based on the up property. Supports drag-and-drop reorganization with automatic link updates, multi-select, and Templater integration.
Xyls Starmap
3 months ago by xylhazlhztarr
A small little plugin for Obsidian MD to create interactive star system maps and planet-side views inside the note-taking app.
Sectionals
3 months ago by Aaron Bell
Edit Markdown by structure
Simple Editorial
3 months ago by Beppe
A minimal editorial markup plugin for writers using Obsidian.
Trade Rythm
2 months ago by iblameaza
Trade Rythm - Obsidian trading journal plugin
Split Groups
2 months ago by Fuad Laguda
Obsidian Bases view that puts a note in every group its list property names
Bases Timeline View
2 months ago by xjiaxiang
timeline view for obsidian bases
TTRPG UI Toolkit
a month ago by hay-kot
UI elements for building dnd character sheets and DM notes
Home Cards
a month ago by ttangents
Give your vault a homepage: a start page or dashboard of note cards from recent notes, properties, tags, links and Bases, with pins, project boards and pages for any folder or tag.
Cool Bases
a month ago by pattgue
Design cool card views for Obsidian Bases.
Masonry
a month ago by Mario Miletta
A visual masonry browser for Obsidian notes and filtered Bases.
Horizon
a month ago by Mario Miletta
Horizon — calendar for your Obsidian vault: daily and periodic notes, tasks, and dated notes in one place.
Note Player
24 days ago by xia-ataraxia
Obsidian plugin that plays note-backed playlists with YouTube (via yt-dlp), cached audio, and local files.
Just Simple Planner
19 days ago by David Hurt
A local visual planner for Obsidian: Markdown notes on a continuous timeline, connected threads, compact previews, tasks and notebook view.