🚀 A simple VS Code extension to normalize newline characters in your text.
- 🔁 Collapse two or more consecutive newlines into a single newline
- 🔁 Convert single newlines (
\n
) into double (\n\n
) - 🔁 Replace semicolons (
;
) with newlines (\n
) - 💡 Works on selected text or the entire document
- Open the Command Palette (
Ctrl+Shift+P
) - Search for one of the following:
LineFormatter: Convert Double Newlines to Single
LineFormatter: Convert Single Newlines to Double
LineFormatter: Convert Semicolons to Newlines
- Run the command
📝 The extension will apply the transformation to your selected text. If no text is selected, the entire document is transformed.
Command | Description |
---|---|
LineFormatter: Convert Double Newlines to Single |
Collapses sequences of two or more newlines into a single \n |
LineFormatter: Convert Single Newlines to Double |
Inserts an extra newline, avoiding duplication |
LineFormatter: Convert Semicolons to Newlines |
Replaces all ; with a newline |
This extension has no settings. Just use the commands!
MIT
- 2つ以上連続する改行(
\n\n
など)を1つの\n
にまとめます \n
を\n\n
に置換(連続改行は維持);
を\n
に置換- テキスト選択時は選択範囲だけ、選択なしならドキュメント全体が対象
- コマンドパレット(
Ctrl+Shift+P
)を開く - 「
LineFormatter: Convert Double Newlines to Single
」または「LineFormatter: Convert Single Newlines to Double
」、または「LineFormatter: Convert Semicolons to Newlines
」を実行 - 結果を確認!
💬 ご意見・改善要望は GitHub にてお待ちしております。