Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>convert-for-loopNew to Visual Studio Code? Get it now.
convert-for-loop

convert-for-loop

Aditya Mittal

|
68 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Problem Statement

Languages reinvented too many long syntaxes for the for loop. It should've just been fi:1:100 { code to repeat } or fi2:1:100 to skip by 2 or fi-1:1:100 to go backward by 2 fi*-2:1:100 etc. Save countless coding hours.

Demo

Demo Video

See Demo Video

Convert For Loop Extension for Visual Studio Code

This extension for Visual Studio Code allows you to quickly convert a string input in the format "fi*x:y:z" into a for loop that goes from y to z with an increment of x.

Installation

  1. Open Visual Studio Code and press Ctrl+P or Cmd+P to open the command palette.
  2. Type ext install and select Extensions: Install Extension.
  3. Search for Convert For Loop and click the Install button.
  4. Click the Enable button to activate the extension.

Usage

  1. Select the string you want to convert to a for loop.
  2. Press Ctrl+Shift+P or Cmd+Shift+P to open the command palette.
  3. Type Convert for loop and press enter.
  4. The selected string will be replaced with the equivalent for loop.

Example

Input String : fi*-1:1:100

Output :

for (let i = 100; i >= 1; i += -1) {
	
}

If you have any issues or suggestions, feel free to contact the publisher "adimittal" at scientificchess@gmail.com.

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft