This extension gives you pre-defined regular expression search, shows the results and also enables you to jump, within the VS Code Quick Command Palette. Would be fit when the language extension for your file doesn't support outline, when you want to list up some kind of custom indices in your document, when you need to jump to the keywords in your document frequently.
Features
Execute the predefined regular expression search from the command palette.
Show its result in the command palette and enables you to jump matched location.
Extension Settings
Romly-RegexpSearchTemplate.templates Defines regular expressions list that will be executed. This will be an array contains JSON objects which have definition like below. A single item can hold multiple regular expressions which are executed at once, as well as the file extensions for which these regular expressions should be executed.
label Name of this item. It's usually not displayed, but is used to select when a corresponding extension cannot be found or when multiple items correspond to a single extension.
extensions If the extension of the file being edited exists in this list of extensions, the search defined by the regular expressions in this item will be executed. If the same extension is defined in multiple items, a selection will be displayed at runtime.
templates One or more regular expressions that will be executed at once by this item. It's a JSON array, and each object has the three properties listed below.
name
pattern The regular expression which will be executed. Note that backslashes (\) must be escaped as \\.
flag Specify the regular expression flags (e.g., gms). If this property is omitted, gm will be specified as the default flags.
label The text label when its result is shown in the command palette. You can use regular expression captures like $0..$9 or named captures liek ${name}. Also you can use icons that is defined by VS Code such as $(symbol-method).
description This is displayed on the right as a description when search results appear in the command palette. If omitted, the "Description Label 2" from the extension settings is used. You can use ${0} .. ${9} for regex captures, ${<group_name>} for named captures, and ${lineNumber} for the line number.
searchText This is the search text passed to the file search when the search button displayed on the right of the search results is clicked. Variables similar to description can be used. If omitted, the entire matched text is passed (equivalent to ${0}).
Please refer to default_templates.ts for an example. Note that the contents of templates_sample.json will be added as default settings if you select 'Yes' in the prompt displayed when settings are not found, such as during the initial execution.
See VS Code extension settings screen for the other settings for this extension.