可见性指示器键盘快捷键
我最近开始使用 coderush。 让我烦恼的一件事是,模板几乎总是扩展到私有,而我经常希望它们是公开的。
由于我经常使用键盘,我想知道 CR 中是否有键盘快捷键,用于更改访问修饰符,类似于单击可见性指示器。
I have recently begun using coderush.
One thing that annoys me is that the templates almost always expand to private, where as I often want them to be public.
Since I use the keyboard alot, I would like to know if there is a keyboard shortcut in CR for changing the access modifiers similar to clicking on the visibility indicators.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,有 Alt+Up 和 Alt+Down 快捷键可以循环切换活跃成员的合法可见性修饰符。此功能称为范围循环。当编辑器插入符位于成员内部的某个位置(例如属性、方法、类等)时,快捷方式将更改其可见性。
Yes, there are Alt+Up and Alt+Down shortcuts to cycle through the legal visibility modifiers of an active member. This feature is called Scope Cycle. When the editor caret is somewhere inside a member (e.g. property, method, class, etc), the shortcuts will change its visibility.
在方法中,使用 Alt+↑ 或 Alt+↓ 循环方法的可见性。
例如:在私有方法中使用Alt+↓,将其可见性更改为公共
此外,您还可以可以通过选项屏幕更改任何成员类型的默认可见性Ctrl+Alt+Shift+O。
您需要的选项页面是编辑器\代码样式\范围页面。
您可以为任何[字段、常量、方法、属性、分配不同的默认可见性事件、类型或嵌套类型]
如果您有任何其他问题,请随时将其发布在 stackoverflow.com 上,或者更直接地与我联系。
可以联系我@[电子邮件受保护] ,或在 Twitter 上显示为 @Rorybecker。您也可以在推文中简单提及 CodeRush,我们一定会尽快采纳并回答您的疑问。
Whilst in a method, use Alt+↑ or Alt+↓ to cycle the visibility of the method.
For example: Use Alt+↓ within a method that is private, to change it's visibility to public
Additionally you can change the default visibility of any member type, via the options screen Ctrl+Alt+Shift+O.
This options page you'll need is Editor\Code Style\Scope page.
You can allocate a different default visibility to any of [Fields, Constants, Methods, Properties, Events, Types or Nested Types]
If you have any other questions, feel free to post them here on stackoverflow.com or to contact me more directly.
I can be reached @ [email protected], or on twitter as @Rorybecker. you can also simply mention CodeRush in your tweet and we will surely pick it up and answer your query as quickly as possible.