Skip to main content

Creating and editing from JetBrains Using Swimm's Plugin

Effortlessly create new docs that interact and are coupled directly with code, without switching to a separate tool

Create Swimm documentation

Step 1: Open a document

Either create a new document or start from an existing one:

Creating a new document

  1. Click Create to start a new document.
  2. Provide a title for your document, and either press Enter or click Save.

Note: The new document will automatically close and reopen as Swimm's plugin creates a file with the right name under the Swimm folder.

Edit existing documents

  1. Open a Swimm document through the IDE plugin in three ways:
    • The Repo docs section
    • Click on the Swimm icon in your code
    • Search for docs in the Swimm search tab
  2. It is not recommended to modify any raw Markdown of a Swimm file directly; it may break some functionality. Instead, modify these docs by going straight to your plugin using Swimm's rich Markdown editor.

Note: When opening a Swimm Document in JetBrains, you can either view it from Swimm Editor or Markdown Split Editor. We highly recommend working from Swimm Editor. JetBrains may open a doc with the Markdown Split Editor initially, in this case - simply change the view as shown below:

Swimm Editor or Markdown Split Editor views in JetBrains IDE's

Step 2: Using Swimm's Slash Commands

After opening a document, explore Swimm's slash command (/). Once you type /, Swimm will provide you with various Markdown options, code snippets, Smart Tokens, paths and more.

Step 3: Adding Code Snippets

  1. Select /Code snippet from the slash command options.
  2. Swimm will prompt you to search for a file and select some code.
  3. Highlight the lines of code you want to include in the document. These lines will appear in your Swimm document, ready to be added.
  4. Snippets have an optional description. Note that this description will appear alongside the Swimm icon next to your code. A well-thought comment can provide good context for the readers of the code.
Swimm Editor or Markdown Split Editor views in JetBrains IDE's

Step 4: Highlighting Code Elements

Explain your code snippets and highlight key elements such as classes, variables, or methods using Swimm's Smart Tokens.

  1. Add a Smart Token using the command /Smart Token and select it from the dropdown, or type backtick `.
  2. Type the value your want to add as a Smart Token, click on it and confirm.

If you cannot find the token you were looking for, check out our advanced token search for Smart Tokens.

Step 5: Saving and committing

Once you're done with the document, save the file and close it.

Since Swimm documents are Markdown files, they can be committed and pushed with your code changes. This ensures that your team has access to up-to-date documentation.


This document is automatically kept up to date using Swimm.