The new code block is nice and I do like the syntax highlighting.
If you’re revamping the whole thing, I think it would be nice to have it be a bit more powerful.
Currently, the text inside a code block wraps. This is very frustrating to me as the code just doesn’t look right and may be hard to identify. There should be a sticky option where I can turn the wrapping off and the code block should just scroll horizontally.
It would be great to also pick a default language.
So far, Notion is the only company that I’ve seen get code blocks right so far (for the most part), except they don’t have basic syntax completion like adding the second bracket.
That’s it for now. Thanks for letting me try out your beta! It’s looking really nice so far!
I do agree on the line-wrapping. it would be great to have a toggle at the top right corner of the code block.
There should be a visual indicator at the front of the wrapped line, as well. Usually this is indicated by the missing line-number, but adding those would clutter code blocks.
In regards to bracket-closing and other features I made a suggestion here.
I hope this proposal to be approved, but also be a toggle for tax wrapping. As I am not a coder but use the code blocks to distinguish between contents, I would still like to have the code wrapping option.
There’s no notable update at the moment as this feature request is not a priority one currently. Don’t worry though, any updates like this will always be announced on the forum here!
Quality benchmark along the philosophy of Bear, of course I appreciate that.
I think that scrolling code block is a MUST… but maybe Bear is not intented to use it as a learning programming notebook with LOT OF CODE in it. Is that a reason to not prioritize the scrolling code block? I have tried to avoid scrolling but is difficult to not need it, maybe is just me.
It is unfair to compare Notion and Bear code block… it must be difficult to receive lot of suggestions from people that appreciate Bear but need specifics features that may affect Bear consistent design. However, I need to understand why a feature like code block scrolling can be expendable
Talking of de facto standard code block representation, how about when the cursor is outside of the block to have the syntax shown in the top right? Also a copy button would be nice (that copies the block minus the backticks.)
It is not among the things we are working on now, but it is something we would like to improve. Both scrolling and a copy button would require non-trivial changes to how code blocks are rendered.