Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Robot-Framework-FormatterNew to Visual Studio Code? Get it now.
Robot-Framework-Formatter

Robot-Framework-Formatter

Flibi

|
6,198 installs
| (1) | Free
VsCode Formatter for robot framework
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

robotFramework-vscodeFormatter README

Features : Document Formatter

  • Document Formatter automatically format the document for readability purpose.

  • This extension only do this, colors are from an other extension.

  • Use "SHIFT + ALT + F" or "right click" -> "Format Document" to format the page.


  • Basics

  • Not Formatted Tests Or Keywords :

Basic

  • Formatted Tests or Keywords :

  • Tags, Setup, Teardown, Arguments and Return are formatted independently, to keep minimal space with given indent.

    Documentation and following "..." aren't formatted, they remain as they were write.

    You can use "|||" in the beginning of a line to avoid the formatting of the line.

    Keywords are formatted in groups, If newline or new test, it starts a new formatted group.

    Basic Format


  • Document Formatter automatically format FOR and IF loop (rbf 4.X for If Loop).

    • Not Formatted Loop :

    Loop

    • Formatted Loop :

      • Each new nested FOR, IF, GIVEN or TRY initiate a new bucket of formatted keywords.

        FOR, IF or ELSE IF, GIVEN THEN, and TRY EXCEPT FINNALY keywords are formatted independently.

        It have the same particularities than basic format.

    Loop Format


  • Document Formatter Indent Option.

    Param Indent

    • Document Formatted with 2 spaces indent :

    two indents


  • Document Formatter listKeywordToFormat Option.
    • List Of Keyword You want To automatically format with given indent.

  • Document Formatter : Keyword with one or many arguments very long (by default, more than 60 chars, excluding spaces in count).

    • Non Formatted Test With Long Arg Keyword :

    longArg

    • Test Formatted :

      • Format type one : only the long keyword is formatted, following lines keep precedent lines format group.

      longArgFormatKeep

      • Option to choose which max length in arg you want before format :

        To avoid bug, if you choose to use this option, set "maxCharsInArgsReinitBucket" to "1000".

      paramlongArgFormatKeep

      • Format type two : only the long keyword line is formatted, following lines start a new formatted group.

      longArgFormatReinit

      • Option to choose which max length in arg you want before format :

        To avoid bug, if you choose to use this option, set "maxCharsInArgsKeepBucket" to "1000".

      paramlongArgFormatReinit


  • Document Formatter : line with a lot of keywords or args (by default, more than 10 kw/args).

    • Non Formatted Test With Many Args and Keywords :

    manyArg

    • Test Formatted :

      • Format type one : only the line with many args/kw is formatted, following lines keep precedent lines format group.

      manyArgFormatKeep

      • Option to choose which max args/kw you want before format :

        To avoid bug, if you choose to use this option, set "maxArgsInKwLineReinitBucket" to "1000".

      parammanyArgFormatKeep

      • Format type two : only the line with many args/kw is formatted, following lines start a new format group.

      manyArgFormatReinit

      • Option to choose which max args/kw you want before format :

        To avoid bug, if you choose to use this option, set "maxArgsInKwLineKeepBucket" to "1000".

      parammanyArgFormatReinit

Credits

  • Coloration comes from "Robot Framework Intellisense FORK"

  • tumit : https://github.com/tumit/vscode-rf-formatter

  • nayanda1 : https://github.com/KMK-ONLINE/vscode-robotExtension

Versions

1.0.0

Initial release

1.1.0

Non Formatted ready to read line by robot Framework with "|||" in the beginning of the line. Use "|" in indentation is now retroactive if you want to suppress them

1.2

Keyword, Tags, Return ... Are now case insensitive. TRY EXCEPT FINALLY from RFW 5 added to formater. Added listKeywordToFormat option

1.2.2

Adding WHILE Loop to formatter

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft