在 NetBeans 中更改模板或 HTML 缩进
如何在 NetBeans 6.7 中更改 HTML 模板?
How to change HTML template in NetBeans 6.7?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
如何在 NetBeans 6.7 中更改 HTML 模板?
How to change HTML template in NetBeans 6.7?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
来自 在 NetBeans 6.0 中使用文件模板< /a> :
转到“工具”->“模板”,然后选择 HTML 模板。 通过选择一个模板并单击“在编辑器中打开”按钮,您可以在 NetBeans 编辑器窗口中查看或编辑该模板。
(来源:oracle.com)
From Using file templates in NetBeans 6.0 :
Go to "Tools"->"Templates", and select the HTML-template. By selecting a template and clicking on "Open in Editor" button you can view or edit the template in NetBeans Editor window.
(source: oracle.com)
在 NetBeans 6.7 中,HTML 模板应位于“工具 > 模板”的“Web”部分。 如果不存在,也许您已经下载了“仅限 Java SE”版本? 或者任何其他不包含“Java Web 和 EE”的下载? 您可以从此处下载“Java”或“全部”版本。 如果您要创建 html,或者“Web”类别中的其他一些文件,那么您最好立即获取完整版本。 以后会省去很多麻烦。
或者,您可以通过创建包含以下内容的“Html.html”文件(这是 NetBeans 的默认模板)来添加该模板:
然后转到“工具 > 模板”窗口,单击“添加”按钮并选择该文件。
如果您想更改此类文件的缩进,请转到“工具 > 选项”、“编辑器”部分、“格式”选项卡,选择“语言:所有语言”并更改“每个缩进的空格数”到您想要的值。 如果选择“将制表符扩展为空格”选项,则“制表符大小”字段决定当您点击制表符时将插入多少个空格。
In NetBeans 6.7 HTML template should be in "Tools > Templates", "Web" section. If it isn't there, maybe you've downloaded "Java SE only" version? Or any other of the downloads that don't contain "Java Web and EE"? You cand download either "Java" or "All" version from here. If you are going create html, or maybe some other files from that "Web" category, then you are better off getting full version right now. It will save you a lot of trouble later.
Or you can just add that template by creating "Html.html" file with the following contents (that is the default template from NetBeans):
Then going to "Tools > Templates" window, clicking "Add" button and selecting that file.
And if you want to change indentation for those kind of files, go to "Tools > Options", "Editor" section, "Formatting" tab, select in "Language : All Languages" and change the "Number of spaces per indent" to your desired value. If "Expand tabs to spaces" option is selected, then "Tab size" field determines how many spaces will be inserted when you hit tab.