VS Code Keybindings for Select All Inside Tag or Expand selection outwards?

别说谁变了你拦得住时间么 提交于 2019-12-11 14:57:55

问题


Cant seem to find what I am looking for and maybe it doesn't exist yet? I have the sublime text keymap extension installed, but that along with VS Code / Emmet seem to be missing one of my all time favorite sublime shortcuts...

Select all inside tags / Expand selection outwards

ctrl+, or ctrl+shift+a


回答1:


I assume you mean the Expand Selection to Tag command in Sublime?

In VS Code the built-in command Emmet: Balance (outward) does basically the same thing. It selects content of a tag and then progressively includes the tag and works outward with each repetition.

You can create a custom keybinding for it as well in the preferences, for example

[
    {
        "key": "ctrl+shift+a",
        "command": "editor.emmet.action.balanceOut"
    }
]



回答2:


I think the closest you will get is with the extension expand-region.

And since you are using Sublime Text Keymap extension try to import your Sublime keymaps. See release notes v1.23 :

The Sublime Text Keymap extension is now able to import settings from Sublime. The first time the extension is launched, a prompt is shown that displays all your importable Sublime settings. If you want to import your settings at a later time, use the Sublime Text Keymap: Import Sublime Text Settings command from the Command Palette (Ctrl+Shift+P).

Maybe you will get lucky with the shortcut you want.



来源:https://stackoverflow.com/questions/49134116/vs-code-keybindings-for-select-all-inside-tag-or-expand-selection-outwards

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!