Simply renumbers lines in the selection. Finds the first number in each line and replaces it with a new number starting from 1.
Note: The regex must contain at least two capture groups. The first should match everything before the 'number' and the second should match the 'number' itself, or watch you want to replace with the incrementing counter. The default regex preserves decimal parts of the number.
Note: The highlight uses CSS outlines. So valid values should include a style (e.g. dashed, dotted, etc. ), a width (e.g. 1px) and a colour. E.g. "solid 2px red"
If you have commented lines which would normally match the regex, you can ignoring them by modifying the regex to include the comment character. For example, to ignore commented lines in markdown, change the regex to:
You can install the latest version of the extension via the Visual Studio Marketplace here.
Alternatively, open Visual Studio code, press
The source code is available on GitHub here.