How to manually create code sections in chat/composer and quick question

What I mean is on most platforms and I think markdown you can type triple ` marks (```) to create a block of monospaced font. This works on the website for anthropic and discord and allows syntax highlighting on the specified language when you do something like:

(triple backtick marks)lang
code
(triple backtick marks)

// it apparently works on the forums so i had to put in a placeholder lol
// is there a way to escape out of those on the forums so i don’t need a placeholder?

I am wondering if it is possible to do that in the chat/composer window and also in the quick question/quick edit menu. I know those support having code sections in your message because when pasting something like that in it gets formatted in as a code section, but I’m trying to make one manually without having to paste something in.

I’ve tried triple back ticks, triple /, triple , tried doing @code, tried looking it up but couldn’t find anything or know if it is even possible. I can obv just type what i wanted to type elsewhere and paste it in, but having to do that is clunky and takes me out of the flow of expressing what i want to express.

Any info on this would be greatly appreciated!

interesting. curios to know why you would want to do this?

would that increase the accuracy/performance of the models? isn’t it additional effort?

i feel like models are good enough to understand the code blocks without them already

note: explaining why you need this might help them prioritise this feature

The original query specifically asks about existing functionality (“How To” category), not feature suggestions.

For context on the utility: Code block formatting serves as a critical visual and semantic separator that:

  • Preserves exact whitespace/indentation crucial for code readability
  • Enables syntax highlighting for improved comprehension
  • Clearly delineates executable content from natural language
  • Maintains consistent UX patterns across technical platforms

The platform already acknowledges this value by auto-formatting pasted code blocks. The question simply asks about manual creation capabilities to avoid workflow disruption, as having to paste from external sources breaks the natural thought/writing process.

The ability to seamlessly transition between prose and code in a single composition flow is fundamental to technical discussion - which is why this pattern has become ubiquitous across development platforms.

You’ve got a good point about the workflow disruption. Right now there isn’t a documented way to manually create code blocks in chat/composer without pasting - the triple backtick markdown syntax isn’t supported yet

The best current workaround is probably using the @code command to reference existing code, as mentioned in our docs here: Cursor – Overview

I totally get why this would be useful for maintaining flow while writing - I’ll make sure to pass this feedback along to the team since it aligns well with our goal of seamless coding experiences