⚡️ Ideas
Andrea Grasso Andrea Grasso Mar 4, 2023

Inline code formatting

Explain the problem as you see it

Tana doesn't allow me to write inline code.

Why is this a problem for you?

As someone who writes technical content, the inability to format text with inline code is a significant problem for me.

Inline code is essential for technical writing, as it allows me to display code snippets or individual lines of code in a way that is visually distinct from regular text. This helps my coworkers to understand code syntax and makes it easier for whoever is reading my notes to follow my instructions or implement my code.

Suggest a solution

Allow inline code formatting

⁨18⁩ ⁨Comments⁩

I consider this very important and really hope the team can make it happen
I use tana to organize my projects at internships and at school and at both these places I used code snippets as resources as well as a scratch pad for quickly scribbling ideas back on roam. It's easily the feature I miss the most!

+100. I am currently keeping my programming notes in Logseq because Tana does not support proper code blocks (can't paste longer than 100 lines) and inline preformatted text.

console.log('Even this comment field supports this.');

Both Capacities and Logseq have great implementations of this.

Logseq just uses CodeMirror — it's free and completely open source: https://codemirror.net/.

Please consider prioritizing this! It would be a game-changer for anyone who uses Tana to keep technical/programming-related notes!

I have a lot of the same problems with code formatting in Tana:

  • It does not autodetect language
  • It does not allow you to search the code language using letters (for example if i want SQL i would like to be able to find it by clicking "s"). Because this is not possible i have to scroll everytime until i find my language of choice.
  • The limit to 100 lines is a problem, because some code is long
  • There is no numbered lines in the code

Please fix this so that i can fully embrace Tana for my technical notes (and stop using notion for this)

Came back to check on this, was disappointed not to see any movement. 😔 If only I could add more votes to this. Absolutely essential feature! Even the comments here have inline preformatting.

Any movement on this? I found out that if you paste text from elsewhere that is styled as such (probably wrapped with <pre> tags in HTML) then Tana accepts it and handles the styling properly.

All I’m asking is for Tana to add the backticks as a formatting trigger!

Makes no sense to be pasting code from another text editor just to get this to work. 😕

In reply to Rickard Natt och Dag Rickard Natt och Dag

I would also like a more useful option than “paste as code” for longer code blocks, but that’s another idea 😄

Should we make this a new thread entirely? The Paste as Code feature is quite limited.

Thank you, works great!

Now for multi-line blocks, although paste as code handles multi-line blocks in a somewhat sufficient way, adding a feature to format an existing node as code, or even type a node as code, would br a great feature improvement.

Would be great if closing with a backtick can format code directly without needing to highlight the text in the first place.