How to Create a Hotkey for Soft Line Breaks in Obsidian

Hi everyone,

I’m looking for a way to create a hotkey in Obsidian that allows me to add soft line breaks within bullet lists. I know that pressing Shift + Enter adds a soft line break, but I would like to have a dedicated hotkey that can insert a specific number of spaces for indentation purposes.

Here’s what I’m trying to achieve:

  • I want to select a text and use a hotkey to add a soft line break with a specified number of leading spaces (e.g., two spaces).

Is there a way to set up such a hotkey in Obsidian without using community plugins? Any help or suggestions would be greatly appreciated!

Thank you!

Are you saying it should add the soft line break on one line and the leading spaces on the next? And by soft line break do you mean Obsidian’s default (a newline), the Markdown standard enabled by the “strict line breaks” setting, (2 spaces followed by a newline?"), or perhaps something else?

To clarify, I would like to add a soft line break that visually indents the text within the same bullet point. By soft line break, I mean Obsidian’s default (a newline) created by pressing Shift + Enter.

Here’s a detailed explanation of what I’m aiming for:

  • When I press the hotkey, the selected lines should be indented to the right by adding a specific number of leading spaces (e.g., two spaces) at the beginning of each selected line.

So, essentially, it’s a combination of a soft line break and leading spaces on the next line to achieve the visual indentation without creating a new bullet point.

For example, in many text editors, if you select a portion of text and press Tab, the selected text moves to the right by adding a tab space. I’m looking for a similar feature but with leading spaces instead of a tab character.

OK, I understand. I suspect there’s a way to do what you want but I don’t know how. As a workaround in the meantime, for multiple lines you might use the multiple cursors feature to place a cursor at the start of each line and then type the spaces. Multiple cursors - Obsidian Help

There are some plugins like “Wrap with shortcuts” that enable one to select text and add something before it (or after, or both), but when you select multiple lines, “Wrap with shortcuts” only adds to the beginning(/end) of the whole selection, not to each line, so that doesn’t help.

You may not know the solution to my problem, but maybe you know what this action is called in Obsidian? For example: “Add Embed”, “Add Tag”, “Add Bookmark From Current File,” and so on. Is there a command name like this?

If there were a command name then that would be the solution, wouldn’t it? :wink:

What you are doing is making a multi-line list item, or putting multiple paragraphs in a list item.

i achieve this with html tag break, like so:

main text
- some text <br>
continue with text which will be indented still

which looks like this in preview:

main text

  • some text

    continue with text which will be indented still


as for soft line breaks per se (no, don’t ask leading chars) linter can add them if you have the setting enabled - but this i wrote here for people led to believe this thread was about actual soft line breaks

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.