by siulved54
Duplicate, join, sort, reverse and clean up lines, insert blank lines and jump to a line number, with multi-cursor support.
Line Editing Commands
Line-level editing commands for Obsidian's editor: duplicate, join, sort, reverse, insert blank lines, select a line, delete to the start or end of a line, jump to a line number, and build multiple cursors the way code editors do (select next occurrence, select all, skip, add cursor above or below). Every command works with several cursors at once, and a single Undo reverts it.
Obsidian already has commands to swap a line up or down, delete a paragraph and toggle lists, so this plugin only adds what is missing.
Commands
| Command | What it does |
|---|---|
| Duplicate line or selection down / up | Copies the selected lines (or the line with the cursor) below or above. Down moves your selection to the copy; up keeps it on the upper copy. |
| Insert blank line below / above | Adds an empty line next to the cursor's line, keeping its indentation, and puts the cursor on it. |
| Select line (repeat to extend) | Selects the whole line. Run it again to add the next line. |
| Join lines | Joins the cursor's line with the next one, or all selected lines, with a single space. The indentation of each joined line is dropped; empty lines are skipped. |
| Sort selected lines (A to Z) / (Z to A) | Sorts the selected lines. Ignores case and compares numbers by value, so item2 comes before item10. |
| Reverse selected lines | Reverses the order of the selected lines. |
| Remove duplicate lines in selection | Keeps the first of each repeated line. |
| Delete to line start / end | Deletes from the cursor to the start or end of its line. It works from the cursor position (the end of a selection that was dragged), so a selection itself is not deleted. |
| Select word or next occurrence | With no selection, selects the word at each cursor. With a selection, adds the next place with the same text (case-sensitive, wrapping around the note) as a new selection and scrolls to it. Repeat to keep adding. |
| Select all occurrences | Selects every occurrence of the selected text, or of the word at the cursor. |
| Skip this occurrence and select the next | Swaps the selection you added last for the next occurrence. |
| Add cursor above / below | Adds a cursor on the line above or below each cursor, at the same column (or at the end of a shorter line). |
| Keep only the main cursor | Drops every other cursor and selection. |
| Go to line number | Opens a small window. Type 42 or 42:7 (line and column). A number past the end goes to the last line. |
The cursor commands only move selections; they never change the note. Letters of any script count as word characters, as do digits and _.
Sort, reverse and remove-duplicates need a selection that spans more than one line; they never touch a single line. A selection that ends at the very start of a line does not include that line. Where several cursors share a line, that line is edited once.
There are no default hotkeys, so nothing clashes with your own. Assign them in Settings → Hotkeys. Suggested starting points, if you are coming from other editors:
| Command | Suggestion |
|---|---|
| Duplicate line down / up | Ctrl+Shift+D / Ctrl+Alt+Shift+D |
| Join lines | Ctrl+J |
| Select line | Ctrl+L |
| Go to line number | Ctrl+G |
| Select word or next occurrence | Ctrl+D |
| Select all occurrences | Ctrl+Shift+L |
| Skip this occurrence and select the next | Ctrl+Alt+D |
| Add cursor above / below | Ctrl+Alt+Up / Ctrl+Alt+Down |
| Keep only the main cursor | Ctrl+Alt+Shift+M |
Notes
- Nothing is sent over the network and the plugin has no settings.
- It works in the editor only (Source mode and Live Preview), on desktop and mobile.
Installation
In Obsidian, open Settings → Community plugins → Browse and search for "Line Editing Commands".
More plugins by Siulved54
| Plugin | What it does | Source |
|---|---|---|
| Shared Blocks | Write a block of text once and reuse it in any note. Edit the source and every reference re-renders live. | shared-blocks |
| Text Case and Cleanup | Change case, make camelCase or slugs, sort lines and remove duplicates, and repair text pasted out of a PDF, without touching code or URLs. | text-format |
| Typography as You Type | Curly quotes, dashes and ellipses as you type, kept out of code and maths, with Backspace to take one back. | smart-typography-plugin |
| Section Numbering | Number headings as an outline (1, 1.1, 1.2) and keep every link to them working when they renumber. | section-numbering |
| Spreadsheet to Table | Paste cells from Excel or Google Sheets as a Markdown table with a real header, insert CSV files, and copy tables back out. | spreadsheet-to-table |
| Hybrid Line Numbers | Relative and hybrid line numbers for Vim-style jumps, where a folded section counts as one line. | hybrid-line-numbers |
| List Item Callouts | Colour a single list item as a callout by starting it with a character such as &, ! or ?. | list-item-callouts |
| Folder Counts | See how many notes or files each folder holds, right in the file explorer, with a vault total and folder exclusions. | folder-counts |
| Note Reading Time | Reading time of the current note or your selection in the status bar, optionally saved to a property. | note-reading-time |
| Task Rollover | Roll unfinished tasks from your last daily note into today's when it is created, with a real undo. | task-rollover |
| Zoom Into Section | Zoom into a heading or list item to see only it and its contents, with a breadcrumb bar to climb back out. | zoom-into-section |
| Link Title on Paste | Paste a web address and get a Markdown link with the page's title, fetched in the background and undone in one step. | link-title-on-paste |
| Update Radar | Checks your installed community plugins for updates in the background, shows what changed, and flags the ones that look abandoned. | community-update-checker |
| Dataview to Bases | Convert Dataview queries into Bases blocks, and see which queries in your vault can be converted. | dataview-to-bases |
| Note Mover Rules | Move notes into folders by ordered rules on tags, properties, titles and paths, with a preview before any bulk move. | note-mover-rules |
| Tab History | Keeps each tab's back and forward history across restarts, and adds commands to move, maximize and close tabs. | tab-history |
| URL Cards | Shows web addresses as cards with title, description and image, and reads existing cardlink blocks. | url-cards |
| Vim Config | Loads a vimrc-style file from your vault so your key mappings and editor commands are ready when vim mode starts. | vim-config |
| Task Archive | Moves completed tasks, with their sub-items, into an archive section or note. | task-archive |
All of them are in the community directory: Settings -> Community plugins -> Browse, then search for the name.
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.