简体   繁体   English

跳转到Visual Studio Code中的括号

[英]Jump to enclosing bracket in Visual Studio Code

In Emacs C/C++/Perl/Lisp etc mode I can do Meta + Ctrl + U to run backward-up-list which takes me to the open bracket containing the current cursor position. 在Emacs C / C ++ / Perl / Lisp等模式下,我可以执行Meta + Ctrl + U运行backward-up-list ,这会将我带到包含当前光标位置的开括号中。 For example, if I'm in a parameter list it takes me to the opening parenthesis after the function name, and if I'm in a statement it takes me to the opening brace for the block. 例如,如果我在参数列表中,则将我带到函数名称后的左括号,如果我在一条语句中,则将其带到该块的左括号。 How do I do the same thing in Visual Studio Code (I'm running the Mac version). 我如何在Visual Studio Code中执行相同的操作(我正在运行Mac版本)。

I know about Cmd + Shift + \\ running Go to Bracket but that takes you to the open/close bracket matching the close/open bracket under the cursor, which is more like Meta + Ctrl + B backward-sexp and Meta + Ctrl + F forward-sexp . 我知道Cmd + Shift + \\运行Go to Bracket但这backward-sexp与光标下的close / open括号匹配的open / close括号,这更像是Meta + Ctrl + B backward-sexpMeta + Ctrl + F forward-sexp

you can try this VS Code extension: https://marketplace.visualstudio.com/items?itemName=OnlyLys.leaper 您可以尝试使用此VS代码扩展名: https : //marketplace.visualstudio.com/items?itemName=OnlyLys.leaper

It provides the ability to leap out of autoclosing pairs with Tab. 它提供了使用Tab跳出自动闭合对的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM