Vim
Vim copied to clipboard
Use % to also trigger Emmet: Go To Matching Tag
It would be super sweet if the % key also triggered Emmet: Go To Matching Tag (built-in command that ships with VS Code) when on HTML tags.
One thing you can do for now is map "editor.emmet.action.matchTag" to a key. I've mapped <leader> % to run editor.emmet.action.matchTag.
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["<leader>", "%"],
"commands": [
{
"command": "editor.emmet.action.matchTag"
}
]
}
]
That's cool. Maybe I can make my own function, and have % trigger my function, then in my function I can conditionally call one or the other? Can you guide me the direction for this? It's very easy in Atom (which seems a lot easier to extend).
Unfortunately emmet go to matching tag does not work in react native. Just FYI.
This works out of the box with the Neo Vim VS Code extension (real Neovim controls the VS Code text buffers), including in JSX expressions (f.e. React Native @uloco).

It's 2023 now. Is this still open?
should work on this but the config works fine ;D
One thing you can do for now is map "editor.emmet.action.matchTag" to a key. I've mapped
% to run editor.emmet.action.matchTag. "vim.normalModeKeyBindingsNonRecursive": [ { "before": ["<leader>", "%"], "commands": [ { "command": "editor.emmet.action.matchTag" } ] } ]
it is not for visual mode even config this:
"vim.visualModeKeyBindingsNonRecursive": [
{
"before": ["<leader>", "%"],
"commands": [
{
"command": "editor.emmet.action.matchTag"
}
]
}
]
it is not for visual mode even config this:
"vim.visualModeKeyBindingsNonRecursive": [ { "before": ["<leader>", "%"], "commands": [ { "command": "editor.emmet.action.matchTag" } ] } ]
Does anyone know how to configure it for visual mode properly to select from open tag to closing tag?
@HabibMollah Isn't vat good for selecting whole tag? (or vit for just the content inside)
@HabibMollah Isn't
vatgood for selecting whole tag? (orvitfor just the content inside)
@LukaErnestini Yes it is! Found out about this motion few days later after I posted the comment above.