• Skip to main content
  • Skip to primary sidebar

Technipages

Smart phone, gadget and computer tutorials

  • Topics
    • Android
    • Gaming
    • Hardware
    • Internet
    • iOS
    • MacOS
    • Office
    • Software
    • Windows
    • Definitions
  • Product Reviews
  • Downloads
  • About
Slack: How to Prevent Messages from Sending When You Press Enter When Sending a Code Snippet

Slack: How to Prevent Messages from Sending When You Press Enter When Sending a Code Snippet

Posted on January 25, 2021 by Mel Hawthorne Leave a Comment

Slack is a chat room type app designed primarily for businesses. It’s intended to work as a single centralized communications platform for the entire company where individual teams and projects can get their own communications channels. This design simplifies communication systems management when compared to managing multiple services for multiple teams across the business.

Knowing that one of the types of teams that will use Slack to communicate amongst themselves are developers, who need to share code, Slack has included a code snippet feature it calls: “Code blocks.” A code block is designed to specifically retain formatting, which can be important in the code’s actual meaning.

By default, a code block doesn’t particularly act any differently than typing normally does. While normal messages tend to be relatively short single lines of text, code is often split across multiple lines. Recognizing this fact, Slack includes an option that changes how the enter key works when you’re typing in a code block. Instead of just immediately sending the message, as is the default, the enter key starts a new line if you’re currently typing in the code block.

How to Start a New Line with the Enter Key on Slack

If you want to enable this setting, go to preferences. To do so, click on your profile picture in the top-right corner, then click on “Preferences.”

Click on your profile picture in the top-right corner. Then click on “Preferences.”

Once in preferences, switch to the “Advanced” tab. Next, tick the top setting in the “Advanced” tab, labeled “When typing code with “`, Enter should not send the message.”

With this setting enabled, the enter key will start a new line when you’re typing in a code block. To send the message, you can either press Shift + Enter from within the code block, close the code block, then move the cursor outside of the block and press enter. Or you can click the send button.

Tip: To close or open a code block, type three backticks ““`” in a row.

Tick the checkbox labeled “When typing code with “`, Enter should not send the message” to change how the enter key works in a code block.

Configuring the enter key to start a new line in a code block makes it easier to type multiple code lines without accidentally sending the message. By following this guide, you can configure code blocks to be safer to use.

You Might Also Like

  • Slack: How To Change What the Enter Button Does and Stop Accidentally Sending Messages
    Slack: How To Change What the Enter Button Does and…
  • Fix Whatsapp Not Sending/Receiving Messages
    Fix Whatsapp Not Sending/Receiving Messages
  • How to Listen to WhatsApp Audio Before Sending It
    How to Listen to WhatsApp Audio Before Sending It
  • Sending Large Files Through Gmail
    Sending Large Files Through Gmail
  • Fix Thunderbird Not Receiving or Sending Emails
    Fix Thunderbird Not Receiving or Sending Emails
  • How to Edit Images on Signal Before Sending Them
    How to Edit Images on Signal Before Sending Them
  • Fix Error 0x800CCC13 Sending Mail in Outlook 2016
    Fix Error 0x800CCC13 Sending Mail in Outlook 2016
  • Skype in Windows 10 Will Soon Support Sending Money Online
    Skype in Windows 10 Will Soon Support Sending Money Online
  • Windows 10: Block Apps From Reading or Sending Texts
    Windows 10: Block Apps From Reading or Sending Texts

Filed Under: Internet Tagged With: Slack

Reader Interactions

Did this help? Let us know! Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Recent Posts

  • How to Group Open Tabs on Chrome
  • Dropbox: How To Review Your Security Settings
  • Teams: Disable All Chat Notifications During Meetings
  • Microsoft Teams: Share to Outlook Not Working
  • Teams: Manage External Access With PowerShell
  • VR Oculus Quest 2: What Is Hand Tracking?
  • Microsoft Teams: How to Enable NDI Streaming
  • Microsoft Teams: Enable Background Effects and Blur

Who’s Behind Technipages?

Baby and Daddy My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

Follow me on Twitter, or visit my personal blog.

You May Also Like

© Copyright 2021 Technipages · All Rights Reserved · Privacy