✓Direct Answer

Oyma detects external file modifications in real time using macOS filesystem event notifications. If you edit or save a note in VS Code, Vim, or Sublime Text, Oyma updates the open view instantly without data loss or conflicts.

Native FSEvents Real-Time File Watching

One of the greatest advantages of local-first software is the ability to leverage multiple specialized tools on the same underlying files. You might prefer Oyma for meeting recording and rich CommonMark authoring, but turn to Vim, Neovim, or VS Code for rapid regex refactoring or batch script manipulation.

Oyma is architected specifically to support this multi-editor workflow.

How the File Watcher Operates

Behind the scenes, Oyma binds directly to Apple’s native macOS FSEvents API:

[External Editor: VS Code / Vim]
             |
             v (Saves file to disk)
   [macOS Kernel / APFS]
             |
             v (FSEvents Notification)
     [Oyma Watcher]
             |
             v (Hash comparison & UI refresh)
      [Oyma Editor View]
  1. Change Notification: When an external program writes modifications to a .md file in your vault, the macOS kernel emits an FSEvents notification.
  2. Buffer Reconciliation: Oyma checks whether the active note in the editor has unsaved in-memory edits. If no unsaved edits exist, Oyma smoothly updates the view with the new text.
  3. Conflict Protection: If you have active unsaved keystrokes in Oyma while an external editor saves changes to the same file, Oyma presents a clean side-by-side reconciliation prompt so you can choose which revision to retain.

Batch Operations and Command-Line Scripting

You can run command-line tools across your vault while Oyma is running:

# Example: Batch replace a legacy tag across 500 documents
find ~/Documents/Vault -name "*.md" -exec sed -i '' 's/#old-tag/#new-tag/g' {} +

Oyma immediately detects the updated files, updates its internal search index, and refreshes any open editor tabs automatically. You get the freedom of command-line Unix tools paired with the polish of a native macOS GUI.

Concurrent Editing and File Watcher Safety

Operating across multiple editors on the same vault:

  • Real-Time FSEvents: Native macOS filesystem notifications alert Oyma to external edits within milliseconds.
  • Non-Destructive Buffer Updates: If the open note has no unsaved in-memory edits, the editor view updates seamlessly.
  • Side-by-Side Conflict Resolution: If concurrent edits occur in both Oyma and an external editor, a clean visual diff lets you choose which lines to preserve.
  • Unix Pipeline Scripting: Safely run shell scripts, regex search-and-replace tools, or python scripts across your notes while Oyma is open.

Instant Multi-Editor Synchronization via FSEvents

The real-time FSEvents watcher updates open editor tabs within milliseconds when files are saved in external editors like Neovim or VS Code, allowing you to use the best tool for every specific writing task.

If you run external scripts to reformat text or batch-rename tags across your vault, Oyma detects the updates immediately and refreshes the search index without requiring an application restart.