Add -- - After Tabs on VSCODE Using Regex-
To add “- " after tabs on Visual Studio Code (VSCode) using regex, you can follow these steps:
-
Open VSCode.
-
Press
Ctrl + H
(orCmd + H
on macOS) to open the Find and Replace panel. -
In the Find input box, input the following regular expression to match tabs at the beginning of each line:
(^\t*)
Make sure to enable the “Use Regular Expression” option by clicking the
.*
icon in the Find panel. -
In the Replace input box, input the following:
$0-
This will insert “- " after each tab matched by the regular expression.
-
Click “Replace All” in the Find and Replace panel.
The result will be as follows:
- Security
- Cashout
- Knowledge (Pengetahuan)
- Education
- Post 5 Articles from Education
- Experience
- Post 5 Knowledge Articles
This will add “- " after tabs at the beginning of each line, as specified in your example.