'Delete paragraph' keyboard shortcut Ctrl+D isn't shown under Settings -> Hotkeys

Steps to reproduce

Have at least two paragraphs in a note.
Put the cursor in one of them
Press Ctrl+D.

Expected result

I expect that nothing will happen, because this keyboard shortcut is not listed in the list of re-mappable hotkeys under settings.

Actual result

The paragraph the cursor is in is deleted.

Environment

  • Operating system: Windows 10 Pro, Version 1909, OS Build 18363.836
  • Obsidian version: 0.6.7
  • Using custom CSS: No

Additional information

This is especially annoying if you remap a different shortcut to Ctrl+D. You don’t get a warning when you do the remapping, but then every time you press Ctrl+D, Obsidian executes the remapped functionality and deletes a paragraph. I mapped ‘switch edit/preview mode’ to Ctrl+D before I realized what was happening, and for a while I thought things were being deleted when I switched to preview mode because I hadn’t properly saved the file, or something. It was jarring behavior.

P.S. I’m really liking Obsidian! Thank you for your work :smiley:

2 Likes

Now that’s a neat little trick :smile:

On macOS, Ctrl+D deletes the letter to the right of the cursor and Cmd+D deletes the whole paragraph.

This is a cool hotkey that I didn’t know about!
It would be better if it select the paragraph instead of just deleting it, but it will be useful for me anyway. :grin:

I also had no idea this hotkey existed. I would call this command/action by the name “yank” as that is what I believe it is called in the Vim world…

Must be added to the settings pane and the command palette (Control+P).

This behaviour really needs to be documented and we need to be warned if CTRL-D is being assigned to something else. I mapped CTRL-D to open my Daily Note and it ends up deleting a bunch of stuff from my current note.

Fixed and will be released in 0.7.5.

1 Like

Steps to reproduce

press command + D

Expected result

nothing happens
because no action is assigned to the keyboard shortcut

Actual result

one line is deleted
And even when I assigned other action to cmd + d, it still delete a line.

Environment

  • Operating system: MacOS Mojave 14.6
  • Obsidian version: 0.7.3

Additional information