gpt4 book ai didi

intellij-idea - WebStorm IDE 中的 VS Code 'Select word at caret' 快捷方式

转载 作者:行者123 更新时间:2023-12-02 05:48:06 25 4
gpt4 key购买 nike

WebStorm IDE 有一个非常有用的shortcut用于通过组合选择文本 Ctrl + W ;

例如,很容易将光标放在函数中的一个参数上,然后按两次组合以选择所有参数,第一次按下将选择一个参数,第二次 - 全部。然后如果你再次按下,IDE 将选择所有功能。

function foo(a, b, c) {}
  • 首次按下:已选择 b (例如)
  • 第二:已选中 a, b, c
  • 第三:已选中函数 foo(a, b, c) {}

  • 总而言之,选择会根据按下快捷键的次数而增加。

    VS 代码 has快捷方式 Ctrl+D 只能选择一个参数。

    有谁知道如何将 WebStorm 中的智能选择添加到 VS Code 中?

    最佳答案

    正如评论所建议的那样,我尝试了 https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings

    然而,我想要的唯一真正的绑定(bind)是增长和收缩选择命令。该扩展将覆盖许多默认的 VScode 键绑定(bind)。要获得增长和缩小选择,请编辑您的 keybindings.json文件添加以下行:

    {
    "key": "ctrl+w",
    "command": "editor.action.smartSelect.grow",
    "when": "editorTextFocus"
    },
    {
    "key": "ctrl+shift+w",
    "command": "editor.action.smartSelect.shrink",
    "when": "editorTextFocus"
    }

    *编辑:使用版本 1.26.1

    关于intellij-idea - WebStorm IDE 中的 VS Code 'Select word at caret' 快捷方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41857846/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com