by Hamirdreza Zamanian
Align and sync two files line by line, most useful for translators.
Precise Line Sync
Disclaimer: This plugin was generated by AI.
Precise Line Sync keeps corresponding logical lines aligned while you read two related notes side by side in Obsidian.
It's most useful for translators who need to view two files at the same time, with proper line alignment.
It is designed for two horizontally adjacent Markdown Live Preview panes. If a line wraps to a different height in either note, the plugin adds a view-only spacer to the shorter pane so the next logical line remains aligned.
Features
- Aligns line 1 with line 1, line 2 with line 2, and so on.
- Synchronizes scrolling in either pane.
- Handles different wrapping and line heights.
- Inserts view-only gaps; Markdown files are never modified.
- Enable, disable, or toggle alignment from the Command Palette.
- Shows the current state in the status bar.
- Recalculates after editing, resizing, pane replacement, and Live Preview virtualization.
Requirements
- Obsidian desktop.
- Two visible, horizontally adjacent Markdown panes.
- Both panes set to Live Preview.
Usage
- Open the two related notes in side-by-side panes.
- Set both editors to Live Preview.
- Open the Command Palette and run one of:
- Precise Line Sync: Enable line alignment
- Precise Line Sync: Disable line alignment
- Precise Line Sync: Toggle line alignment
- Scroll either pane. Corresponding logical line starts will track each other.
The status bar displays Line sync: on or Line sync: off.
Installation
Community Plugins
After approval, install Precise Line Sync from the Obsidian Community directory: open Settings → Community plugins, search for Precise Line Sync, and select Install.
Manual installation
- Download
main.js,manifest.json, andstyles.cssfrom the latest GitHub release. - Create a folder named
precise-line-syncunder your vault's.obsidian/plugins/directory. - Copy the three downloaded files into that folder.
- Restart or reload Obsidian.
- Enable Precise Line Sync under Settings → Community plugins (
ctrl+p).
Important limitations
- Alignment is intentionally based on source line numbers, not semantic paragraph matching. Inserted or deleted lines shift all subsequent correspondence.
- Reading view, mobile, and pop-out windows are not supported.
- The plugin chooses one horizontally adjacent pair when more than two Markdown panes are visible.
- Tables, embeds, folded sections, math blocks, and other renderers that combine or replace multiple source lines may not preserve exact line correspondence.
- The plugin is intended for ordinary prose, blank lines, headings, and wrapped text.
Privacy
Precise Line Sync does not make network requests, collect telemetry, or send note contents anywhere. It stores only its enabled/disabled state and local display settings using Obsidian's plugin data storage.
All alignment gaps are editor-view decorations. The Markdown files remain unchanged.
Development
npm install
npm run validate
npm run validate builds the distribution bundle, checks JavaScript syntax, and validates the release metadata.
The files distributed to users are:
main.jsmanifest.jsonstyles.css
The project is licensed under the MIT 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.