问题
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