Repository navigation
Commands
Most commands are available from the Command Palette (Ctrl+Shift+P) under the Verse Auto Imports category, so typing that name lists them together.
Six commands need an argument the palette cannot supply, so they are reached from a quick fix or a CodeLens instead and no longer appear in the palette: Add Import, Use Absolute Path, Use Absolute Paths for All, Use Relative Path, Use Relative Paths for All and Make Module Public. Their IDs still work from a keybinding or task that passes the argument.
Command IDs are stable across versions, so keybindings and tasks that reference them keep working. The titles changed in v0.9.0 — the Verse: prefix moved into the palette category — but no ID did.
- Import Management
- Path Conversion
- Module Visibility
- Toggle Settings
- Auto Import Control
- Cache Management
- Utilities
- Binding a Command to a Key
| Command | ID | Description |
|---|---|---|
| Optimize Imports | verseAutoImports.optimizeImports |
Sort and organize all imports in the current file |
| Add Import | verseAutoImports.addSingleImport |
Add a specific import; reached from a quick fix, not the palette |
Optimize Imports is also VS Code's own Organize Imports source action in .verse files, so Shift+Alt+O, the Source Action menu and editor.codeActionsOnSave all run it. See Organize Imports.
All four are reached from the path conversion CodeLens, not the Command Palette.
| Command | ID | Description |
|---|---|---|
| Use Absolute Path | verseAutoImports.convertToFullPath |
Convert a single import to absolute path format |
| Use Absolute Paths for All | verseAutoImports.convertAllToFullPath |
Convert all relative imports to absolute paths |
| Use Relative Path | verseAutoImports.convertToRelativePath |
Convert a single import to relative path format |
| Use Relative Paths for All | verseAutoImports.convertAllToRelativePath |
Convert all absolute path imports to relative paths |
See Path Conversion for how conversion resolves module paths.
Reached from the quick fix on the compiler's inaccessible-module error, not the Command Palette.
| Command | ID | Description |
|---|---|---|
| Make Module Public | verseAutoImports.makeModulePublic |
Declare an internal module <public> so another module can import it |
See Module Visibility for what it writes and when it declines.
Each of these flips the matching setting at the level that already holds a value: a folder setting where one exists, otherwise a workspace setting, otherwise your user settings. A toggle therefore takes effect even in a project whose workspace or folder settings already set the value, instead of writing a user setting the override would hide. In a multi-root workspace the folder containing the active file is the one that changes.
The same toggles are available from the Status Bar Menu.
| Command | ID | Setting it changes |
|---|---|---|
| Toggle Auto Import | verseAutoImports.toggleAutoImport |
general.autoImport |
| Toggle Preserve Import Locations | verseAutoImports.togglePreserveLocations |
behavior.preserveImportLocations |
| Toggle Import Syntax | verseAutoImports.toggleImportSyntax |
behavior.importSyntax |
| Toggle Digest Files | verseAutoImports.toggleDigestFiles |
experimental.useDigestFiles |
| Toggle Path Conversion Helper | verseAutoImports.toggleFullPathCodeLens |
pathConversion.enableCodeLens |
| Command | ID | Description |
|---|---|---|
| Snooze Auto Import | verseAutoImports.snoozeAutoImport |
Pause auto-imports for 5 minutes |
| Cancel Snooze | verseAutoImports.cancelSnooze |
Resume auto-imports before the snooze expires |
A snooze is held in memory only and never writes to your settings. While one is active the status bar shows a countdown and the status menu shows Snoozed (M:SS) on the Auto Import row. Reloading the window or restarting VS Code ends the snooze rather than extending it.
To add time to a running snooze, use Add 5 Minutes in the Status Bar Menu — there is no palette command for it.
These commands have no equivalent in the status bar menu; the palette is the only way to reach them.
| Command | ID | Description |
|---|---|---|
| Rebuild Project Path Cache | verseAutoImports.rebuildPathCache |
Force a complete cache rebuild |
| Clear Project Path Cache | verseAutoImports.clearPathCache |
Wipe the in-memory cache and its persisted copy without rebuilding, so the next lookup starts cold |
| Show Cache Status | verseAutoImports.showCacheStatus |
View cache statistics and health |
See Path Tree Caching for what the cache holds, and Troubleshooting for when to reach for these.
| Command | ID | Description |
|---|---|---|
| Show Quick Menu | verseAutoImports.showStatusMenu |
Open the Status Bar Menu |
| Export Debug Logs | verseAutoImports.exportDebugLogs |
Export debug logs to a file for troubleshooting |
| Capture Diagnostics Corpus | verseAutoImports.captureDiagnosticsCorpus |
Export the verbatim compiler diagnostics of open Verse files to JSON, for maintaining the message-format regression corpus |
Because the IDs are stable, a keybinding written once keeps working across updates. Open Preferences: Open Keyboard Shortcuts (JSON) and add an entry:
{
"key": "ctrl+alt+o",
"command": "verseAutoImports.optimizeImports",
"when": "editorTextFocus && editorLangId == verse"
}The when clause is worth keeping: without it the binding overrides that key everywhere, not just in Verse files.
Install from the Marketplace · Report an issue · Discord · Changelog
Verse Auto Imports is an independent extension by VukeFN. Not affiliated with or endorsed by Epic Games. Verse, UEFN and Fortnite are trademarks of Epic Games, Inc.
How it works
Reference
Help