Inline code blocks

It would be very helpful to have the option to add inline code blocks, similar to Notion. Following is how an inline code block looks like in Notion:

The “instanceOf” text in the above screenshot is inside an inline code block. As can be seen, it helps in differentiating code from normal text. I often find the need for this while taking notes on any topic related to programming and I have seen many other people also request this on the Discord channel in the past.

In my opinion, no code highlighting is required in such blocks. Only a different font, preferably mono-spaced, and a different font-color should suffice to mark some text as a inline block of code.

Yeah that would be useful. That can be done with some CSS.

I remember someone mentioning they did exactly that (I think they just made the Quote style monospace).

For example:

.quote {
font-family: monospace;
}
2 Likes

That’s a great idea.

Just It would nicer to do it without knowing CSS. I assume many people don’t know CSS here.

1 Like

Yes, Custom CSS.

2 Likes

Thanks @ognsya and @hannesfrank. That’s a nice workaround and I am using it as of now. But it would be nice to have the option to use both quote blocks and inline code blocks and I feel that the default styling of the quote block can also use at least a little tweaking.

1 Like

Yeah, agree. This is just a workaround…

I’d consider this a vital feature, and it isn’t just a matter of having unique styling. Inline code blocks are necessary because code frequently contains characters like _, *, ~, and >>, which get parsed into formatting or card indicators. Try using the backtick-delineated RemNote quote blocks now to write about Python dunder methods (e.g. __repr__). You can’t just write what you want to write, or paste what you want to paste; you have to remember to write _r_repr_r_ and then move back and remove the extra Rs manually, or double-check your pastes for things that got interpreted as meaningful.

I’d suggest it work like in the inline KaTeX input: a command or character string (double or triple backticks, maybe) triggering the appearance of the new input field, which parses nothing as formatting, and is completed only by pressing enter, not by any character that might appear in it.

2 Likes

Agree, two separate entities for inline code blocks and quotes (block quote)

1 Like