In VSCode when I type a bracket, e.g '(', it automatically creates the ending bracket: ')'.
Are there any shortcuts to jump to the closing bracket or parenthesis, without pressing the 'End' key?
I found a way to do in Sublime Text 2 that did exactly that, using a Regex in the User's Key Bindings, but couldn't find a way to do it in VSCode.
Thank you.
Mac Cmd+Shift+\
Windows Ctrl+Shift+\
As well you can do:
Ctrl+Shift+p
And select
Preferences: Open Keyboard Shortcuts
There you will be able to see all the shortcuts, and create your own.
The out-of-the-box way to do it is
Ctrl + Shift + |
You can learn commands from the command palette (Ctrl/Cmd+Shift+P). Look for "Go to Bracket". The keybinding is also shown there.
Command "editor.action.jumpToBracket" jumps between opening and closing brackets.
Here is the command's default key binding as seen in window Default Keyboard Shortcuts accessed from File | Preferences | Keyboard Shortcuts:
{ "key": "ctrl+shift+\\", "command": "editor.action.jumpToBracket",
"when": "editorTextFocus" }
If you're fond of quickly configuring keyboard shortcuts and VS Code settings, there are commands "workbench.action.openGlobalKeybindings" and "workbench.action.openGlobalSettings":
~/.config/Code/User/keybindings.json:
{ "key": "ctrl+numpad4", "command": "workbench.action.openGlobalKeybindings" }
{ "key": "ctrl+numpad1", "command": "workbench.action.openGlobalSettings" }
For those with a non-US keyboard:
File > Preferences > Keyboard Shortcuts.
(Code > Preferences > Keyboard Shortcuts on Mac)
shows the current key bindings. See also here: https://code.visualstudio.com/docs/getstarted/keybindings
In Spanish keyboard it's Ctrl+Shift+º
It seems to change from one keyboard layout to another, so better look for it with Cmd+Shift+P and type "go to bracket" as others suggested.
The shortcut is:
Windows/English Ctrl+Shift+\
Windows/German Ctrl+Shift+^
Press Ctrl
+k
+s
or
Open up File --> Preferences ---> Keyboard Shortcuts
Here, type editor.action.jumpToBracket
will show you what is the current setting. You can keep it as is or change it to your combination.
In german VS-Environments(here 2015): Optionen/Umgebung/Tastatur. (english: options/environment/keyboard). Show Commands With "GeheZuKlammer" (english: "GoToBracket"). Set your own Shortcut.
(For anybody looking how to do it in Visual Studio!)
Please use Control + ] by placing your cursor on start or end
I've found the easiest way to get to line end is by hitting the following
Mac: ctrl+E