Skip to content
프로젝트

antfu/vscode-smart-clicks

GitHub에서 보기

소개

VS Code에서 더블 클릭으로 스마트 선택을 사용할 수 있습니다.

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Smart Clicks VS Code

Visual Studio Marketplace Version

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 = []
└──────────┘

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

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
  }
}

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

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

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

Sponsors

Credits

Inspired by HBuilderX, initiated by 恐粉龙.

License

MIT License © 2022 Anthony Fu

관련 프로젝트 살펴보기

불러오는 중…