如何配置 NetBeans 以插入选项卡而不是一堆空格? [英] How can I configure NetBeans to insert tabs instead of a bunch of spaces?

查看:17
本文介绍了如何配置 NetBeans 以插入选项卡而不是一堆空格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我点击 Tab 来缩进代码时,我喜欢得到一个真正的 Tab.这意味着当我选择它时,我只选择了一件大事.当我点击 Tab 时,NetBeans 会插入 5 个空格而不是制表符.有什么办法可以改变吗?

When I hit Tab for indenting code, I like to get a real tab. Meaning that when I select that, I only have one large thing selected. NetBeans inserts 5 spaces instead of a tab when I hit Tab. Is there a way I can change that?

推荐答案

转到工具->选项->编辑器->格式并取消选中将选项卡扩展到空格:

确保您还为每个缩进的空格数"和制表符大小"选择了一致的值.

Ensure you also pick coherent values for "Number of Spaces per indent" and "Tab Size".

此外,您可以检查语言组合中的所有项目,并确保它们都使用常规设置.

Additionally, you can check all the items in the Language combo and make sure they all use the general setting.

您也可以按项目进行更改.右键单击项目图标,选择属性并查看格式类别.

You can also change it in a per-project fashion. Right click on the project icon, select Properties and review the Formatting category.

这些菜单项自 NetBeans 8.0 起仍然有效.

这篇关于如何配置 NetBeans 以插入选项卡而不是一堆空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆