Batch Indentation: Two Characters for Chinese First Lines

Open Tool Indent Adjuster

Four actions, one purpose

Batch indentation adds or removes leading space across many lines, or gives the first line one extra level. Chinese documents conventionally indent the first line by two characters, while code indents by nesting level. The tool offers spaces or tabs, an indent width, blank-line skipping and an extra first-line level, with add, reduce and apply buttons. Indentation never changes wording, only readability and apparent structure, so check results in the target environment.

Steps

  1. Paste the lines and keep a copy.
  2. Choose spaces or tabs for the target.
  3. Set the width, two characters for Chinese first-line indents.
  4. Tick blank-line skipping to avoid trailing spaces on empty lines.
  5. Add or reduce, checking levels stay even; apply to normalise to one width.
  6. Copy or download and check in the destination.

Mixed indents, reduction, code

Existing indentation stacks into staircases when more is added, so reduce to zero first for control. Reduction strips only leading whitespace and leaves unindented lines alone, but a line whose leading spaces are content loses characters, which needs checking. Empty lines gain invisible trailing spaces that commit checks flag. First-line and hanging indents are separate layouts, one indenting only the first line and the other the rest, and mixing them looks sloppy. Code is the riskiest target, since indentation defines scope in some languages and one extra space changes behaviour.

Common mistakes

Reduction deleting content that began with spaces. Empty lines collecting trailing spaces. Mixed tabs and spaces displaying crooked. First-line and hanging indents confused. Batch indents on code rewriting structure. And a width that disagrees with the document standard.

Where indentation belongs elsewhere

Code goes to a formatter that follows language rules. Typeset publications use layout software rather than plain text. Language-specific habits mean one setting cannot serve all. Table data must not gain indents, or columns drift. And any indented output used as final layout gets checked in the reading environment.

⏫︎