有 Netbeans 统治者吗
这里有一个简单的问题要问大家:
Netbeans IDE 中是否可以在编码窗口顶部显示标尺 - 就像在 Microsoft Word 或上下文代码编辑器中一样?如果是这样,怎么办?
我尝试过用谷歌搜索,但没有成功......
Heres a quick questions for all you folks out there:
Is it possible in the Netbeans IDE to show a ruler on top of the coding window - like in Microsoft Word or the Context code editor? If so, how?
I have tried googling it, but to no avail...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相当肯定答案是否定的,正如编辑现在的立场。唯一远程相关的是右边距线,可以在“选项”中设置,在“编辑器”下,然后在“格式”下。它绝不是作为标尺,但至少给您一个提示,表明您已到达特定的列。
为了获得此功能,要么必须编写一个模块来将该功能添加到编辑器中,要么开发团队必须将其添加到核心编辑器代码中。可以在 Netbeans.org 的问题页面上提出功能请求。请务必先搜索,因为可能已经有人提出了请求。
I am fairly certain that the answer is no, as the editor stands right now. The only thing remotely related is the right-margin line, which can be set in Options, under Editor, then Formatting. It, by no means, serves as a ruler, but at least gives you a hint that you've reached a particular column.
In order to get this functionality, either a module would have to be written that adds the functionality to the editor, or the development team would have to add it to the core editor code. A feature request can be made on Netbeans.org's issues page. Be sure to search first, as someone may have already made the request.
如果通过标尺您的意思是要显示您所在的字符/列,您可以通过查看编辑器窗口的右下角部分(显示为“行|列”)来获取该信息,但如果通过标尺你指的是网格,它无法通过开箱即用的 Netbeans 实现。您只能获得字符限制线,对于那些需要打印代码以进行审查或交付工件的人来说,该限制线仍然默认为 80 个字符(...颤抖...)该限制线可以在 NB 7.2(等)中设置菜单工具->选项->编辑->格式化然后寻找右边距。颜色可以在工具->设置选项->然后在字体和颜色中查找文本行限制。
我不会在没有翻白眼的情况下添加下一个可能性,但考虑到 Netbeans 出色的水平分割,您始终可以通过创建一个 Ruler.txt 文件来模仿顶部标尺,并将其作为文本:
然后抓取该文件的选项卡并将其移至顶部拆分。我现在这么说,是为了拯救所有此刻伸手鼠标点击评论链接来攻击我的人,但这完全是做作,对于实际目的来说确实没有必要:)
If by ruler you mean you want to show which character/column you're on, you can get that information from the looking in the bottom right hand portion of the editor window (shown as "row | column"), but if by ruler you mean grid, it isn't doable with Netbeans out of the box. You only get the character limit line, which is still defaulted to 80 characters for those required to print their code for review or delivery artifacts (...shiver...) That limit line can be set in NB 7.2 (et al) from menu Tools -> Options -> Editor -> Formatting then look for Right Margin. The color can be set on the Tools -> Options -> Fonts and Colors then look for Text Line Limit.
I don't add this next possibility without a bit of eye rolling, but given Netbeans' great horizontal splitting, you could always mimic a top ruler by creating a ruler.txt file with this as the text:
and then grab that file's tab and move it to the top split. I'll say this now so as to save all those who are at this very moment reaching for their mouse to click on the comment link to blast me, but this is totally hokey and really unnecessary for practical purposes : )