How to use
- Fill in Text, Spaces to add for Indenting.
- To match “Two spaces on a snippet”, enter Text if (ready) { / ship(4); / }; Spaces to add 2.
- Press Indent. The summary line should be “Indenting: added 2 spaces to 3 lines”.
- Read every line under “Indenting: added 2 spaces to 3 lines” before you copy the Indenting result.
- Press Copy for the whole Indenting result, or Reset to restore “Two spaces on a snippet”.
- For the second check, “Four spaces on a list”, the summary should be “Indenting: added 4 spaces to 2 lines”.
Formula / how it works
Example “Two spaces on a snippet” sets Text = if (ready) { / ship(4); / }; Spaces to add = 2.
Indenting returns this exact text:
Indenting: added 2 spaces to 3 lines
---
if (ready) {
ship(4);
}
Every line gets the same pad, including the brace lines.
Example “Four spaces on a list” sets Text = tape / labels; Spaces to add = 4.
Indenting returns this exact text:
Indenting: added 4 spaces to 2 lines
---
tape
labels
The pad is spaces, not a tab.
Indenting vocabulary for this page: indent, spaces, line, pad, code, indenting.
Indenting pass 1 (“Four spaces on a list”) prints:
Indenting: added 4 spaces to 2 lines
---
tape
labels
The words for this pass are indent, spaces, line, pad, code, indenting.
Indenting pass 2 (“Two spaces on a snippet”) prints:
Indenting: added 2 spaces to 3 lines
---
if (ready) {
ship(4);
}
The words for this pass are indent, spaces, line, pad, code, indenting.
Indenting pass 3 (“Four spaces on a list”) prints:
Indenting: added 4 spaces to 2 lines
---
tape
labels
The words for this pass are indent, spaces, line, pad, code, indenting.
Indenting pass 4 (“Two spaces on a snippet”) prints:
Indenting: added 2 spaces to 3 lines
---
if (ready) {
ship(4);
}
The words for this pass are indent, spaces, line, pad, code, indenting.
Indenting pass 5 (“Four spaces on a list”) prints:
Indenting: added 4 spaces to 2 lines
---
tape
labels
The words for this pass are indent, spaces, line, pad, code, indenting.
Indenting pass 6 (“Two spaces on a snippet”) prints:
Indenting: added 2 spaces to 3 lines
---
if (ready) {
ship(4);
}
The words for this pass are indent, spaces, line, pad, code, indenting.
Indenting pass 7 (“Four spaces on a list”) prints:
Indenting: added 4 spaces to 2 lines
---
tape
labels
The words for this pass are indent, spaces, line, pad, code, indenting.
Indenting pass 8 (“Two spaces on a snippet”) prints:
Indenting: added 2 spaces to 3 lines
---
if (ready) {
ship(4);
}
The words for this pass are indent, spaces, line, pad, code, indenting.
Worked examples
Two spaces on a snippet
Inputs: Text: if (ready) { ship(4); } | Spaces to add: 2
Set Text if (ready) { / ship(4); / }, then Spaces to add 2. Press Indent. The Indenting summary should read “Indenting: added 2 spaces to 3 lines”.
Result: Indenting: added 2 spaces to 3 lines
---
if (ready) {
ship(4);
}
Every line gets the same pad, including the brace lines.
Four spaces on a list
Inputs: Text: tape labels | Spaces to add: 4
Set Text tape / labels, then Spaces to add 4. Press Indent. The Indenting summary should read “Indenting: added 4 spaces to 2 lines”.
Result: Indenting: added 4 spaces to 2 lines
---
tape
labels
The pad is spaces, not a tab.
Use cases
- Check “Indenting: added 2 spaces to 3 lines” before trusting a new Indenting input.
- Check “Indenting: added 4 spaces to 2 lines” as the second Indenting case.
- Every line gets the same pad, including the brace lines.
- The pad is spaces, not a tab.
Tips & limitations
- “Two spaces on a snippet”: Every line gets the same pad, including the brace lines.
- “Four spaces on a list”: The pad is spaces, not a tab.
- Indenting fields: Text, Spaces to add.
- The Indenting summary for the opening example is “Indenting: added 2 spaces to 3 lines”.
FAQ
What does “Two spaces on a snippet” return?
Indenting summary: “Indenting: added 2 spaces to 3 lines”. Full result: Indenting: added 2 spaces to 3 lines --- if (ready) { ship(4); }
What does “Four spaces on a list” return?
Indenting summary: “Indenting: added 4 spaces to 2 lines”. Full result: Indenting: added 4 spaces to 2 lines --- tape labels
Which values produce “Indenting: added 2 spaces to 3 lines”?
Text: if (ready) { ship(4); } | Spaces to add: 2
Which values produce “Indenting: added 4 spaces to 2 lines”?
Text: tape labels | Spaces to add: 4
How is “Indenting: added 2 spaces to 3 lines” different from “Indenting: added 4 spaces to 2 lines”?
“Two spaces on a snippet” gives “Indenting: added 2 spaces to 3 lines”. “Four spaces on a list” gives “Indenting: added 4 spaces to 2 lines”.
What does Indenting include in the full first result?
Indenting: added 2 spaces to 3 lines --- if (ready) { ship(4); }
Runs entirely in your browser; your text is not uploaded. Counts and scores are heuristics, so review the output before you publish it.