I humbly submit cmd + shift + D as a keyboard shortcut to duplicate the current line, or the currently selected lines. This is a code editor shortcut that comes in handy for me when taking notes.
Any other variant would work. I’d prefer cmd + D, but as I’ve discovered that’s a command to delete the current line.
That’s great until I need to use Obsidian on another computer. It would be nice to know that, out of the box, wherever I want to use it, Obsidian has a keybinding for duplicating lines.
There’s already Vim keybinding built in, which would allow me to duplicate lines fairly easily. Being able to quickly toggle between using Vim and regular key bindings would be nice too.
Not urgent, but I think Sublime Text has had a great line duplication feature (CTRL/Command + Shift + D) and duplicates by line or by selection. I’m sure its not the only editor to have the feature, but I hadn’t explored other editors as deeply.
Most of the other major text editors and IDEs have this feature. I hope it becomes part of the core keybindings, not just in VIM, which not everyone uses.
Chiming in here that I would very much like to see a “duplicate line” hotkey. Coming from a programming background, this is part of my muscle memory and it makes creating Markdown tables so much easier, for example, because I can just copy a table row and don’t have to type the | character manually (or copy the line manually).
I’d love to have this hotkey. I use this constantly while coding in VSCode and it would make my life way easier for things like lists and structured docs
Yes but the fundamental difference in Obsidian is that Readable line length‑setting is either on or off and Obsidian doesn’t offer any feature to toggle this setting easily on the fly. Line duplication editing action makes most sense in case of Readable line length‑setting is turned off.
Related feature requests about Readable line length—note that some of them might be duplicate feature requests @CawlinTeffid :