Skip to content

Repository files navigation

Smart Block Select

Smart Block Select

🇰🇷 한국어

Instantly select the nearest enclosing logical block — function, arrow function, if/else, loop, JSX element — with a single keystroke.

Usage

Place your cursor anywhere inside a block, then press:

Platform Shortcut
Windows / Linux Shift+Alt+S
macOS Shift+Alt+S

The entire enclosing block is selected. Press again to expand to the next outer block.

Supported Block Types

  • function declarations and expressions
  • Arrow functions (const fn = () => {} — selects the full const statement)
  • if / else if / else chains
  • for, for...in, for...of loops
  • while and do...while loops
  • JSX elements, self-closing elements, and fragments (<>...</>)
  • return statements

Supported Languages

  • TypeScript (.ts)
  • TypeScript + JSX (.tsx)
  • JavaScript (.js)
  • JavaScript + JSX (.jsx)

How It Works

Smart Block Select uses the TypeScript compiler API to parse your file into an AST (Abstract Syntax Tree) and finds the innermost supported block node containing your cursor. No language server required — it works instantly on any file.

Commands

Command Description
Smart Block Select: Select Block Select the block containing the cursor

Extension Settings

This extension has no configurable settings.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages