HomeVBUC > Message
Desktop & web

Using code snippets in the app desktop and web

Last updated on February 14, 2022

Table of contents

Code snippets are small chunks of reusable machine code, source code, or text. The app allows you to easily share bits of codes, configuration files, or log files directly within your conversation stream. You can manage the snippet with actions, such as viewing, adding, editing, deleting, sorting, filtering, grouping, and renaming.
 
If you are a developer, the code snippets feature in the app would help you in your day-to-day work for better collaboration and efficiency. You can share large text or chunks of programming code by using code snippets.

Using code snippets in the app

  1. Navigate to Message via the left-hand navigation bar.
  2. Select a conversation from the conversation list.
  3. Click the New code snippet button above the message field.
  4. Enter a title in the Enter snippet title field.
  5. Select a Language from the dropdown menu.
  6. Check the box for Text wrap if you prefer this option.
  7. Paste or type your code in the field provided.
  8. Click Post to send it as message in the conversation stream.
These are the settings included when posting code snippets as a message.
  • Title: The title of the code snippet
  • Language: The programming language, which is a set of instructions or commands used to write the code. This includes high-level languages, such as Visual Basic, Java, Python, C#, PHP, and more. Your selection will be remembered until the next time you change this setting
    • Auto detect type: Select this option to automatically detect the language of the code
  • Text wrap: Breaks a section of text into lines to fit it into the available width of the display area. Your selection will be remembered until the next time you change this setting

Managing code snippets

Once you or someone else have shared a code snippet in a conversation stream, there are several actions that you can take on a snippet, including the following:
  • Downloading a code snippet
  • Copying a code snippet
  • Sharing a code snippet
  • Editing a code snippet
  • Deleting a code snippet
  • Expanding and collapsing a code snippet
There are two methods of doing these actions: via the conversation stream and via the conversation details panel. For the purpose of this article, we’ll discuss how to take any of these actions via the conversation stream.

Downloading code snippets

  1. Select a conversation from the conversation list.
  2. Hover your mouse over the snippet you want to download.
  3. Click the Download arrow down button at the top right of the snippet. The snippet will be saved as a text document to your computer.

Copying code snippets

  1. Select a conversation from the conversation list.
  2. Hover your mouse over the snippet you want to copy.
  3. Click the Copy square icon at top right of the snippet.

Sharing code snippets

  1. Select a conversation from the conversation list.
  2. Hover your mouse over the snippet you want to share.
  3. Click the More three-dot icon at top right corner of the snippet.
  4. Click Share snippet.
  5. At the top of the Share snippet modal window, begin typing the name or email address of the person or the team name you’d like to share the snippet with.
  6. Click the name or team name. A message that says the snippet has been shared will appear at the top.

Editing code snippets

Anyone in the conversation (direct message, group message, or team) can edit the code snippet that has been shared. To do this, follow these steps:
  1. Select a conversation from the conversation list.
  2. Hover your mouse over the snippet you want to edit.
  3. Click the More three-dot icon at top right corner of the snippet.
  4. Click Edit snippet.
  5. Edit the snippet as you wish.
  6. Click Save.

Deleting code snippets

Anyone in the conversation can delete the code snippet that has been shared. To do this, follow these steps:
  1. Select a conversation from the conversation list.
  2. Hover your mouse over the snippet you want to delete.
  3. Click the More three-dot icon at top right corner of the snippet.
  4. Click Delete snippet.
  5. Click Delete to confirm.
© 1999 - 2022 RingCentral, Inc. All rights reserved.
Thanks!
We've sent you a link, please check your phone!
Please allow a full minute between phone number submissions.
There was an issue with SMS sending. Please try again. If the issue persists, please contact support.