Smart Clicks VS Code
Smart selection with double clicks for VS Code.
GIF Demo
Usage
Double clicks on the code.
Rules
bracket-pair
Pair to inner content of brackets.
β½
(foo, bar)
ββββββββ
dash
-
to identifier.
β½
foo-bar
βββββββ
html-attr
=
to HTML attribute.
β½
<div class="btn"></div>
βββββββββββ
html-element
<
to the entire element.
β½
<div><div></div></div>
ββββββββββββββββββββββ
html-tag-pair
Open and close tags of a HTML element.
β½
<div><div></div></div>
βββ βββ
js-arrow-fn
=>
to arrow function.
β½
(a, b) => a + b
βββββββββββββββ
js-assign
=
to assignment.
β½
const a = []
ββββββββββββ
js-block
Blocks like if
, for
, while
, etc. in JavaScript.
β½
function () { }
βββββββββββββββββββ
β½
import { ref } from 'vue'
βββββββββββββββββββββββββ
This rule is disabled by default.
js-colon
:
to the value.
β½
{ foo: { bar } }
βββββββ
jsx-tag-pair
Matches JSX elements' start and end tags.
β½
(<Flex.Item>Hi</Flex.Item>)
βββββββββ βββββββββ
Configuration
All the rules are enabled by default. To disable a specific rule, set the rule to false
in smartClicks.rules
of your VS Code settings:
// settings.json
{
"smartClicks.rules": {
"dash": false,
"html-element": false,
"js-block": true
}
}
Sponsors
Credits
Inspired by HBuilderX, initiated by ζη²ιΎ.
License
MIT License Β© 2022 Anthony Fu