Forum Discussion

cakehead123's avatar
cakehead123
Copper Contributor
Oct 01, 2021

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?

 

 

 

    • wy125's avatar
      wy125
      Copper Contributor
      That 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.
  • fahimchy's avatar
    fahimchy
    Copper Contributor

    cakehead123 

    its now available by default, just after the insert link 

    check that symbol for code snippet... </>

    • DustinMoriartyAF's avatar
      DustinMoriartyAF
      Copper 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.

    • cakehead123's avatar
      cakehead123
      Copper 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

      • jason1977's avatar
        jason1977
        Copper Contributor
        Is there a way to report the bug? It's very frustrating
  • wy125's avatar
    wy125
    Copper Contributor
    As 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.
  • Phillip85's avatar
    Phillip85
    Copper 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...

  • alrazmi's avatar
    alrazmi
    Copper Contributor
    Try adding a space after the three backticks, that fixed the issue for me.
    • jared52's avatar
      jared52
      Copper Contributor
      Just came back to say I accidentally discovered the space thing and that does work for me. Silly.
      • patrickraco's avatar
        patrickraco
        Copper Contributor

        jared52 

        the space worked for me too, but the formatting/spacing isn't maintained... ughhhh... why?! So frustrating!

    • ffj601's avatar
      ffj601
      Copper Contributor
      Great 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
  • jared52's avatar
    jared52
    Copper Contributor
    Same issue. Seems odd to have been changed from the universal ``` format if they changed it. My guess is it's a bug.

Resources