LiberRPA Snippets TreeIf the images are not displayed, view this README on GitHub. LiberRPA Snippets Tree displays built-in, Favorite, and Component Snippets and inserts them into Python files together with their required imports. You do not need to memorize the complete LiberRPA Code Reference.
UsageInsert SnippetsLiberRPA Snippets can be inserted into Python files by clicking, dragging, or using IntelliSense. All three methods update the Managed Import block when imports are required. Click a Tree NodeClick a Snippet in LiberRPA Snippets Tree. Statement Snippets are inserted on the current empty line or on a new line with matching indentation. Expression Snippets, such as Project Values, are inserted at the cursor or replace the current selection.
Drag and DropDrag a Snippet from the Tree to the required editor position.
IntelliSenseType a Snippet prefix or a meaningful part of its API name in a Python file, then select the LiberRPA completion. LiberRPA Snippet completions supplement normal Python IntelliSense, so local variables, functions, types, and other Python completions remain available.
You can search by the beginning of an API name, a meaningful word within the name, or a short abbreviation built from consecutive parts of the API name. Adding the module name, such as LiberRPA only adds Snippet suggestions when the current text is relevant to a known Snippet. Unrelated Python identifiers continue to use normal Python IntelliSense. The completion details show the code that will be inserted and its description.
When a return-value Snippet is inserted through IntelliSense or drag-and-drop, using it at the beginning of a line keeps the result assignment. Inside existing code, such as an Snippet PlaceholdersAfter insertion, use While editing a Python Snippet field, For example,
The first
Some parameters provide a predefined list of valid values. To enter a variable or another expression instead, press After exiting placeholder mode, Managed ImportsLiberRPA maintains a Managed Import block in Python files:
Required imports are merged, deduplicated, and ordered according to the loaded Snippet Catalogs. Do not manually edit content inside the Managed Import block. Imports outside the block are not modified. When a file does not yet contain the block, LiberRPA inserts it after the module header, module docstring, and any When Python code is pasted through the LiberRPA Editor paste shortcut, LiberRPA also detects referenced built-in APIs and direct Component modules and adds their Managed Imports. If the Python file is temporarily invalid, the paste still succeeds and the import update is skipped. Project ValuesThe Project Values Category contains expression Snippets supplied by the current RPA Project, for example:
First-level
Nested keys are suggested from complete, explicit
When editing Only explicitly written keys are used; structures returned by functions or built through aliases are not inferred. If a file temporarily contains a syntax error, its last successfully read keys remain available until the file can be parsed again. Suggestions describe keys found in the source, not a guarantee that they exist at runtime. Selecting a Project Value or CustomArgs completion also adds its required import. Use the Secondary SidebarTo keep VS Code Explorer and LiberRPA Snippets Tree visible at the same time, move the Snippets Tree view to the Secondary Sidebar. Drag its icon from the Activity Bar into the Secondary Sidebar:
You can also drag it to the right side of the editor:
Move it back to the Activity Bar when needed:
Favorite SnippetsFrequently used Snippets can be added to:
If the file does not exist, LiberRPA Snippets Tree creates it from the bundled template when the extension loads. Run Favorite Snippets appear in the
The easiest way to create a Favorite is to copy an entry from the built-in Snippet Catalog, then edit its title, prefix, body, label, or description. After saving the file, run See Favorite Snippet Configuration for the complete file structure, field definitions, imports, insertion modes, and examples. Known Issues
|






