Fix Line Endings on Copy
approvedby KiwiJanus
Change line endings to CRLF when copying text on Windows (add carriage return).
Obsidian Line Ending CopyFix
An Obsidian plugin that ensures content copied from your notes uses platform-appropriate line endings. Currently, it targets Windows users, replacing Unix-style line feeds (\n) with Windows-style carriage return + line feed (\r\n) only when copying text. Your markdown files remain untouched.
β¨ Features
- π Automatically replaces
\nwith\r\non copy if your OS is Windows - π§ Works with:
- Manual text selections (
Ctrl + C) - Code block βcopyβ buttons
- Retains obsidian's behaviour where copying without text selected copies the current line
- Pop-out windows
- Manual text selections (
- π Does not modify your stored
.mdfiles - π» Windows-only by default (future support for more platforms is planned)
π¦ Installation
From Obsidian: Community Plugins (Recommended)
This plugin is now published to the Obsidian Community Plugins directory. Install it directly from Obsidian:
- Open Settings β Community Plugins β Browse and search for
Fix Line Endings on Copy, then install and enable it. - Or open the plugin directly in Obsidian using this link:
obsidian://show-plugin?id=line-ending-copyfix.
From GitHub: Manual Installation (Fallback)
- Download the latest release from the Releases page
- Extract the archive into your vaultβs plugins folder
<your-vault>/.obsidian/plugins. The folder structure should look like this:<your-vault>/.obsidian/plugins/obsidian-line-ending-copyfix/ βββ main.js βββ manifest.json - Restart Obsidian or reload plugins from Settings β Community Plugins
- In Obsidian, open Settings β Community Plugins
- In the list of installed plugins, find Fix Line Endings on Copy and enable it.
π§ Why?
Obsidian uses LF (\n) line endings across all platforms, which is great for consistency.
However, many older Windows applications expect CRLF (\r\n) line endings. Without this, copied content may appear "squished" into a single line.
This plugin solves that by converting line endings only at the time of copying, so your notes stay clean and portable.
βοΈ Future Plans
- Submit to Obsidian's community plugin directory (approval pending)
- Add command palette support for manual line-ending conversion
- Make line-ending style configurable (LF, CRLF, CR)
- Toggle plugin behavior with a settings UI
- Add support for various platforms and their line-ending conventions if someone needs it
π¬ Feedback / Contributing
Bug reports, feature requests, and pull requests are welcome on the GitHub Repository
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.