Soft returns? Someday? Maybe?

I love Bear more than any other similar app, but I can’t help but still wish for this addition.

In regular Markdown, a soft return can be added by putting two spaces at the end of a line before hitting Return. This lets you break lines without creating vertical space, signifying a new paragraph, which is super useful for keeping text organized.

The most popular markdown syntaxes — CommonMark, GitHub Flavored Markdown (GFM), MultiMarkdown, Pandoc markdown, and Gruber’s original Markdown — all allow for soft returns (through the 2 spaces + Return method) in addition to standard hard returns (just Return).

Likewise, other minimal text editors (Obsidian, Typora, Notable, Zettlr, iA Writer, Byword, MacDown, Ulysses) all allow for soft returns by means of Shift + Return.

Right now, Bear doesn’t support this, so it’s unable to control line breaks without the extra space a new paragraph brings. Adding this feature would give users more flexibility, especially for those of us who like to keep things tight and tidy in our notes.

Thanks for considering this, or for sharing why it’s been intentionally left out of Bear’s functionality set.

6 Likes

Allowing Soft Returns would also address other spacing issues, like How to bring together a header and a subtitle? - #2 by that_jonasw

1 Like

Please! Soft returns would be great. It would also let you fix the current “paragraph gap” nonsense within the UI, which should be “line gap” rather than paragraph gap.

2 Likes

I agree I need this too

I am very sure that soft breaks were possible in bear 2 and then removed at some point, or?

Here’s a workaround/hack that allows for soft returns in Bear.

My method is now to use a text replacement shortcut (on Mac this is in System Settings > Keyboard > Text Replacements), so that when I type ||, it’s replaced by the soft return character, which can be copied and pasted from U+2028.

Screenshot of the result in Bear:

Hopefully this solution works for those in need.

2 Likes

Amazing, thanks gkindrick—that works! I do wish they’d include it officially however. + would be much simpler (either that, or follow the actual markdown standard).

Bear has some secrets. And this is one of them. Why isn’t it possible to use shift+enter like in most apps (f.e. apple notes) to generate a soft break. @trix180, can you clarify?

Avoiding soft-breaks is a choice of ours, or to be more precise, a choice generated by another choice.
In Markdown, a soft-break is a single carriage return, while a new paragraph is 2 carriage returns. Our idea since Bear 1 is that this is not beneficial in the note-taking context, and generally speaking, not in line with our idea to reduce the gap between a markdown and a rich-text editor.
In this context, we think having another way to express the soft break in the editor is confusing and still doesn’t feel like the right direction.

Last but not least, soft breaks are problematic in many ways for markdown parsing.

4 Likes

Thank for your approach, which I think makes complete sense.

This makes sense.

But what about if I paste some text in that has line breaks without an empty line in between?

Say I have this in my clipboard:

foo
bar
baz

foo bar baz

I would like this to be pasted into Bear as such:

foo bar baz

foo bar baz

But instead it gets pasted as:

foo

bar

baz

foo bar baz

Is this worth a consideration? Even if its a special “paste from markdown” or something in the “paste from” menu item?

To expand on this: I regularly paste text from my editor into Bear. In the editor, me and my co-workers use hard line wrapping in markdown files, so they are easier to read in terminals. So e.g. a long paragraph gets split into multiple lines of max 80 characters long, and the paragraph is denoted by an empty line after it. When I paste this paragraph in bear, because my Bear is configured to show LESS than 80 characters before wrapping, it looks really weird, no to mention that my screen reader reading the text in Bear mistakes the line break as a new sentence, making for awkward tone and emphasis of the individual lines in the paragraph.

I don’t see how we can overcome this to be honest. We don’t know where the text in the clipboard comes from and what line wrapping was used. We should honor what we find in the clipboard and translate it into markdown.

I see your point (and how an additional item in the “paste from” menu doesn’t really cover this case). I guess the next best thing would be a global option to treat single newlines as soft wrapping, this is how (e.g.) GitHub Gists (and other GitHub text input) works: if I paste in the markdown from my editor, a newline is treated as soft wrapping, and two newlines is treated as indicating the end of a paragraph.

But I also understand, given Bears very minimal set of options, that this might not be to your liking either.