Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jump to Closing tag in VS Code?

I can't seem to find a way to select the beginning of a bracket and jump to the end of it through some key combination or something in VS Code. For example, in atom, this is done with Ctrl + m.

I know there is a way to jump to the beginning and end of a bracket or curlybraces with Cmd + Shift + \ but that does not work for tags. Any ideas?

like image 624
Ciprian Turcu Avatar asked Mar 24 '17 10:03

Ciprian Turcu


People also ask

How do you jump to define in VS Code?

Go to Definition# Tip: You can jump to the definition with Ctrl+Click or open the definition to the side with Ctrl+Alt+Click.

How do you jump between tabs in VS Code?

When using Visual Studio Code on Windows, you can use CTRL + PAGE_UP to switch to the previous tab, and CTRL + PAGE_DN to switch to the next tab. You also have the ability to switch to tabs based on their (non-zero relative) index. You can do so, by pressing and holding ALT , followed by a number (1 through 9).


2 Answers

It is possible to do, but either using Ctrl + Shift + P -> "Emmet: Go to Matching Pair" or by manually setting a shortcut for it (Ctrl + K Ctrl + S).

Unfortunately there is currently no support for it out of the box.

like image 187
Jakub Jurkian Avatar answered Sep 22 '22 13:09

Jakub Jurkian


You can use Cmd + % to jump tags in VSCode if you add the following to your keybindings.json.

{     "key":"cmd+shift+5",     "command": "editor.emmet.action.matchTag" } 

Go to: File > Preferences > Keyboard Shortcuts and click the underlined link to edit keybindings.json.

For those using VIM keys: you are already used to pressing % to jump to matching parens and tags. So, hopefully, Cmd + % will be close enough to your existing muscle memory to make this transition painless.

like image 27
f1lt3r Avatar answered Sep 26 '22 13:09

f1lt3r