Remove Newlines
Core Features
- Adds two (sorely needed) actions to Obsidian.md:
- Remove newlines from text (optionally remove word-break hyphenation and fix consecutive whitespace issues)
- Remove blank lines from text
- The actions accept input from wherever you might have text:
- Selected in the editor
- From your clipboard (while pasting)
- The actions can be run any way you find most convenient:
- Right-click menu (context menu)
- Keyboard shortcuts (hotkeys)
- Command Palette
Usage
Paste without newlines
Remove newlines from text selection
Paste without blank lines
Remove blank lines from text selection
Change Settings
You can change how Remove Newlines handles word-break hyphenation and consecutive whitespace (when removing newlines) by visiting the plugin's settings tab.
Adding Hotkeys
There are no hotkeys for these actions by default, but you can create them in the settings modal under the "Hotkeys" section.
What's New?
1.0.5
- Added the ability to remove blank lines from the context menu and the command palette.
1.0.4
- Fixed a bug where invoking plugin actions from command palette did not work, and added newlines at the top of the file.
- Added support for
CR
, LF
, and/or CR LF
line endings.
1.0.3
- Added ability to remove newlines from text selection in the Obsidian editor.
- Addeded ability to paste content without newlines into the Obsidian editor.
Installing
Via the Community Plugin Manager
- Open the Community Plugins tab of your Obsidian's settings modal.
- Click the "Browse" button under "Community Plugins".
- Search for "Remove Newlines".
- Click "Install" on the plugin page, then "Enable".
Via URI/Browser
- Visit the official plugin page on Obsidian's plugin repository.
- Click "Install".
- Allow the site to open the obsidian link via Obsidian.
- Click "Install" on the plugin page, then "Enable".
Manually
- Download the latest release of the plugin.
- Create a
remove-newlines
folder in your vault's plugins/
directory: <YourVaultFolder>/.obsidian/plugins/remove-newlines
- Unzip the release file and copy over
main.js
, styles.css
, and manifest.json
into the remove-newlines/
folder you created in step 2.
Report Issues
If you encounter any issues, please report them on the issue tracker for this plugin.
Request Features
If you'd like to request a feature or have an idea for a new feature, please use the GitHub issue tracker.
Inspection
All relevant source code can be found in main.ts
. To compile yourself from source:
- clone this repo
cd
to the project folder
- run
npm run dev
or npm run build
- perform a manual install