Skip to main content
Z

Ruby / Lua / Perl Formatter — Reindent Three Languages

Reindent only — not a full formatter

Reindent Ruby, Lua, or Perl source. One tool, three keyword-driven languages.

Miễn phí Không cần đăng ký Chạy trên trình duyệt Tôn trọng riêng tư Updated

Cách dùng

  1. 1 Pick the language: Ruby, Lua, or Perl.
  2. 2 Paste source code.
  3. 3 Tune indent size — 2 spaces is idiomatic for Ruby, 2 or 4 for Lua and Perl.
  4. 4 Copy or download the result.

Vì sao dùng công cụ này

  • One tool covers three syntactically similar block-end-keyword languages.
  • Per-language openers: <code class="rounded bg-slate-100 px-1 text-xs dark:bg-slate-800">do/end</code> for Ruby, <code class="rounded bg-slate-100 px-1 text-xs dark:bg-slate-800">function/end</code> for Lua, braces for Perl.
  • Pure client-side — your code never leaves the browser.
  • For canonical output use RuboCop (Ruby), StyLua (Lua), or perltidy (Perl) locally.

Câu hỏi thường gặp

Is this RuboCop-compatible?

No — this is a reindenter only. RuboCop applies hundreds of style cops; we apply indent rules based on block-opening keywords.

Does it understand here-docs and string interpolation?

Indent is computed line-by-line, so here-doc bodies may receive an extra leading space. For files heavy in here-docs, run the language-specific formatter.

Why is one tool for three languages?

Block structure is similar — single keyword opens, <code class="rounded bg-slate-100 px-1 text-xs dark:bg-slate-800">end</code> or <code class="rounded bg-slate-100 px-1 text-xs dark:bg-slate-800">}</code> closes. One rule engine, three keyword sets.

Ruby / Lua / Perl Formatter là gì?

A Ruby / Lua / Perl Formatter is a tool that reindents Ruby, Lua, or Perl source code in the browser. It combines three keyword-driven languages into one formatter, applying consistent indentation based on each language's block structure while running entirely client-side.

Tóm tắt

Ruby / Lua / Perl Formatter là công cụ lập trình miễn phí của Zerethon Tools. Reindent Ruby, Lua, or Perl source. One tool, three keyword-driven languages. Chạy hoàn toàn trong trình duyệt — không đăng ký, không tải lên.

Danh mục
Lập trình
Giá
Miễn phí
Quyền riêng tư
Chạy trên trình duyệt
Đăng ký
Không cần

Quyền riêng tư

Dữ liệu của bạn không bao giờ rời khỏi trình duyệt trừ khi được nêu rõ. Ruby / Lua / Perl Formatter chạy hoàn toàn phía client — không tải lên máy chủ, không ghi log, không theo dõi dữ liệu bạn nhập.

Công cụ liên quan

Build, share, and grow on Zerethon Social

Free signup. Earn points, collect achievements, and connect with creators worldwide.

Try Zerethon free