Renumber SelectionSimply renumbers lines in the selection. Finds the first number in each line and replaces it with a new number starting from 1. Examples:
Configuration
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" Ignoring commentsIf 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:
InstallingYou can install the latest version of the extension via the Visual Studio Marketplace here. Alternatively, open Visual Studio code, press
Source CodeThe source code is available on GitHub here. |