简体   繁体   English

VS Code 中是否有用于导航到 angular 组件的 HTML 的快捷方式,反之亦然?

[英]Is there any shortcut in VS Code for navigating to HTML of angular component or vice versa?

Is there any keyboard shortcut available for VS Code for navigating from angular component.ts file to its component.html file or component.html file to component.ts file? VS Code 是否有任何键盘快捷键可用于从 angular component.ts文件导航到其component.html文件或component.html文件到component.ts

or is there any extension available for it?还是有任何可用的扩展程序?

It very difficult to open component's HTML file or vice versa while working in ZEN mode or full screen mode.在 ZEN 模式或全屏模式下工作时,很难打开组件的 HTML 文件,反之亦然。

I know we can use ctrl + shift + p to open command palate and we can open desired file, but I'm looking for any keyboard shortcut if available.我知道我们可以使用 ctrl + shift + p 打开命令上颚,我们可以打开所需的文件,但我正在寻找任何可用的键盘快捷键。

Yes.是的。 This extension is what you are looking for: angular2-switcher这个扩展就是你要找的: angular2-switcher

To take your example, to switch from component.ts to the corresponding component.html, use shortcut:举个例子,从 component.ts 切换到相应的 component.html,使用快捷方式:

alt+o

Yes, VS code gives you simple shortcut to navigate in opened files by是的,VS 代码为您提供了在打开的文件中导航的简单快捷方式

ctrl + tab

this will open the next file opened, and if you want to navigate to the previous file again in case of multiple files open, just use这将打开下一个打开的文件,如果您想在打开多个文件的情况下再次导航到上一个文件,只需使用

ctrl + shift + tab

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

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