欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

vscode (vs code) extend extends selection Expand selection to word 扩选 扩大选中 扩大选择 引号 有大用 有大大用 有大大大用 有大大大大用

1)

image.png

2)  Expand Selection

editor. action.smartSelect.expand

image.png



一, 下面的几个也不错,扩选后的东西还包含了单引号(双引号)

Shift + Alt +  selects enclosing elements.收起选择

Shift + Alt +  reverses Shift + Alt + .  展开选择,

Shift + Alt +  selects enclosing elements moving up the file.

Shift + Alt +  selects enclosing elements moving down the file.


二 安装插件  expand-region (支持HTML、css文件的[],{},"",''里面的内容)

image.png

安装后可以看到下图

image.png



File -> Preferences -> Keyboard Shortcuts,或者:Alt+F -> p -> k

右上角

image.png

 keybindings.json 路径为 C:\Users\11111111\AppData\Roaming\Code\User\ keybindings.json

image.png

修改 keybindings.json 为


// 将键绑定放在此文件中以覆盖默认值auto[]
[
    {
        "key": "ctrl+d",
        "command": "editor.action.copyLinesDownAction",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "shift+alt+down",
        "command": "-editor.action.copyLinesDownAction",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "ctrl+shift+d",
        "command": "editor.action.deleteLines",
        "when": "textInputFocus && !editorReadonly"
    },
    {
        "key": "ctrl+shift+k",
        "command": "-editor.action.deleteLines",
        "when": "textInputFocus && !editorReadonly"
    },
    {
        "key": "ctrl+w","command": "expand_region", "when": "editorTextFocus"
      },
      {
        "key": "ctrl+shift+w","command": "undo_expand_region", "when": "editorTextFocus && editorHasSelection"
      }
]



image.png



expand tag for balance  这个扩展也可以装下

image.png

普通分类: