Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Awesome Line Splitter JsNew to Visual Studio Code? Get it now.
Awesome Line Splitter Js

Awesome Line Splitter Js

Aleks Kinokus

| (0) | Free
Long lines splitter for more readable code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Awesome String Split

Split a string at the cursor using the same quote it was written with. Works in JS/TS/JSX/TSX.

  • Inside '...' or "...": closes the current string, inserts + and a newline, then reopens with the same quote.
  • Inside `...`: inserts a newline (template literals are multiline-safe).
  • Preserves current line indentation.
  • Default keybinding: Shift+Enter.

Why

  • Faster edits. Break long strings at the cursor without manual cutting, closing, and reopening quotes.
  • Always valid. Ensures the result is syntactically correct (closes, concatenates, reopens) instead of leaving a broken string.
  • Keeps style. Preserves the original quote type and indentation, avoiding lint/prettier churn and noisy diffs.
  • Fewer mistakes. Reduces off-by-one and escaping errors that happen when splitting by hand.
  • Template-literal aware. For backticks, just inserts a newline (multiline by design), or can be configured otherwise.

Before:

const msg =
  "This is a very long message that I want to split here|and keep readable.";

After: (press Shift+Enter at the cursor)

const msg =
  "This is a very long message that I want to split here" +
  "and keep readable.";

Usage

  1. Place the caret inside a string.
  2. Press Shift+Enter (or run the command below).

Command

  • Awesome String Split: split string at cursor
    Command ID: awesomeStringSplit.splitAtCursor

Supported Languages

  • javascript, typescript, javascriptreact, typescriptreact

Known Limitations

  • Detection is line-based; extremely exotic cases (e.g., unterminated strings) may fall back to a plain newline.

Installation

  • From Marketplace (once published)

License

MIT

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