Add -- - After Tabs on VSCODE Using Regex-

To add “- " after tabs on Visual Studio Code (VSCode) using regex, you can follow these steps:

  1. Open VSCode.

  2. Press Ctrl + H (or Cmd + H on macOS) to open the Find and Replace panel.

  3. 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.

  4. In the Replace input box, input the following:

    $0- 

    This will insert “- " after each tab matched by the regular expression.

  5. 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.

0%