Forum Discussion
MS Teams latest update code snippet shortcut gone
Hey,
I have noticed in the latest team update you cannot do 3 backticks ``` anymore as a shortcut for a code snippet box. You can start ` and end ` with a backtick but this only works for one line of code, which isn't very useful.
I know you can still do it the long clicky way by going to the format box and clicking "code snipppet etc" but this is extremely annoying to do 20 times per day.
Does anyone know if there is a new shortcut for this?
- foo-barCopper ContributorI've suggested a keyboard shortcut (feel free to vote for it :)):
https://feedbackportal.microsoft.com/feedback/idea/39e6d27f-6ecc-ec11-a81b-000d3a03dba2 - AndrzejKrawiecCopper Contributor
cakehead123 Try add space after tripled tick - it works then.
- wy125Copper ContributorThat doesn't work for me. It shows the snippet box when I do that, but it doesn't preserve the spacing of the source text, so the text can appear misaligned. I paste a lot of code snippets and these all appear misaligned for me.
- fahimchyCopper Contributor
its now available by default, just after the insert link
check that symbol for code snippet... </>- DustinMoriartyAFCopper Contributor
fahimchy I don't see why I would want to use a mouse in order to type a code block. This seems like a regression more than a feature. Using a graphical menu gets really clunky when going back and forth in a chat. We used to be able to quickly discuss code and log messages using markdown notation. If language selection is desired, this is supported by standard markdown without a menu. However, in a chat context, no one is trying to make anything pretty. Usually one just wants monospaced fonts and some indicator that the code is part of a block separate from the discussion.
- cakehead123Copper Contributor
fahimchy hi, thanks.
As stated in my original post though, I know this, but this is highly inconvenient compared to the old shortcut, especially when pasting bits of code tens of times a day
- jason1977Copper ContributorIs there a way to report the bug? It's very frustrating
- wy125Copper ContributorAs the others have reported, the ``` works flawlessly only in a Teams channel. It does not work in a chat. The ``` followed by a space does sort of work, but spacing is not preserved like it is in a Teams channel. It just looks horrible in chat. I noticed that it works in the Web App in both chat and channels like it's supposed to. None of my colleagues have this issue, it's just me for some reason. I got a new machine too, and the problem followed me. Wonder if it's tied to my profile somehow.
- Phillip85Copper Contributor
for me three backspaces followed by a whitespace does not work,
But monospaced in the Teams Area is working...
Monospaced in the Chat Area is not working...
Using Code Snippet is working in both...
- alrazmiCopper ContributorTry adding a space after the three backticks, that fixed the issue for me.
- jared52Copper ContributorJust came back to say I accidentally discovered the space thing and that does work for me. Silly.
- patrickracoCopper Contributor
the space worked for me too, but the formatting/spacing isn't maintained... ughhhh... why?! So frustrating!
- raysunbeamCopper Contributor
cakehead123 try adding a space after the 3 back ticks.
- ffj601Copper ContributorGreat find thank you, now I can't figure out how to end the snippet and go back to normal text without posting and going to a new post, really silly
- jared52Copper ContributorSame issue. Seems odd to have been changed from the universal ``` format if they changed it. My guess is it's a bug.
- cakehead123Copper ContributorHave your reported it?
- jared52Copper Contributor
cakehead123 Yes, through the feedback mechanism in the app.