Smart Select
Select the right code scope with double click.
Usage
Double click somewhere in the code, and the extension will select the right scope for you.
Rules
More rules in the future...
Double click the center of =>
to select the entire arrow function.
▼
const add = (a, b) => a + b
└─────────────┘
Double click near the =
to select the entire assignment.
▼
const add = (a, b) => a + b
└─────────────────────────┘
Double click the pre-defined keyword to select the entire block statement.
▼
function add(a, b) { return a + b }
└───────────────────────────────┘
▼
try { add(1, 2) } catch (e) {}
└────────────────────────────┘
Pre-defined keywords: try
, catch
, finally
, do
, for
, while
, if
, else
, switch
, case
, default
, function
, class
.
Double click left of {
to select the entire block.
▼
function add(a, b) { return a + b }
└──────────────┘
Double click the import
or export
keyword to select the entire statement.
▼
import { add } from './math'
└──────────────────────────┘
▼
export function add(a, b) { return a + b }
└────────────────────────────────────────┘
Inspiration
Smart Clicks
~~Perhaps more user-friendly.~~