Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
V

vscode-smart-clicks

> 开发工具
Open source

Smart selection with double clicks for VS Code.

690 stars0 likes1 views
WebsiteGitHub

About

Smart selection with double clicks for VS Code.

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.

javascript
▽
(foo, bar)
 └──────┘

dash

- to identifier.

css
   ▽
foo-bar
└─────┘

html-attr

= to HTML attribute.

xml
          ▽

     └─────────┘

html-element

` └────────────────────┘


#### [`html-tag-pair`](https://github.com/antfu/vscode-smart-clicks/blob/main/src/rules/html-tag-pair.ts)

Open and close tags of a HTML element.

```html
 ▽

 └─┘              └─┘

js-arrow-fn

=> to arrow function.

javascript
       ▽
(a, b) => a + b
└─────────────┘

js-assign

= to assignment.

javascript
        ▽
const a = []
└──────────┘

class B {
    ▽
  b = 1;
  └────┘
    ▽
  ba = () => {};
  └────────────┘
}

js-block

Blocks like if, for, while, etc. in JavaScript.

javascript
▽
function () {     }
└─────────────────┘
javascript
▽
import { ref } from 'vue'
└───────────────────────┘

This rule is disabled by default.

js-colon

: to the value.

javascript
     ▽
{ foo: { bar } }
       └─────┘

jsx-tag-pair

Matches JSX elements' start and end tags.

javascript
  ▽
(Hi)
  └───────┘     └───────┘

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:

jsonc
// settings.json
{
  "smartClicks.rules": {
    "dash": false,
    "html-element": false,
    "js-block": true
  }
}

Commands

ID Description
smartClicks.trigger Trigger Smart Clicks in current cursor position without mouse click

Usage examples:

  1. Command palette

    Invoke the command palette by typing Ctrl+Shift+P and then typing Smart Clicks: Trigger.

  2. Keyboard shortcuts

    jsonc
    // keybindings.json
    {
        "key": "ctrl+alt+c",
        "command": "smartClicks.trigger",
        "when": "editorTextFocus"
    }
  3. Vim keybindings (VSCodeVim is needed)

    jsonc
    // settings.json
    {
      "vim.normalModeKeyBindings": [
        {
          "before": ["leader", "c"],
          "commands": ["smartClicks.trigger"],
        }
      ]
    }

Sponsors

Credits

Inspired by HBuilderX, initiated by 恐粉龙.

License

MIT License © 2022 Anthony Fu

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptvscodevscode-extension

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具