如何更改Eclipse以在Javascript编辑器中使用空格而不是制表符? [英] How do I change Eclipse to use spaces instead of tabs in Javascript editor?

查看:254
本文介绍了如何更改Eclipse以在Javascript编辑器中使用空格而不是制表符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Eclipse JavaScript插件,我有我的文本编辑器设置插入空格作为选项卡这工作正常,直到我选择一个代码块并选中它或移动选项卡,运行JSLint和AARGghh! 混合空间和标签。有什么我想念的,这可能吗?

I use the Eclipse JavaScript plugin, I have my text editor settings to "insert spaces as tabs" this works fine until I select a block of code and tab it or shift tab it, run JSLint and AARGghh! "Mixed spaces and tabs." is there something I am missing, is this possible?

推荐答案

我不确定你在哪里设置编辑器属性插入空格作为标签。要设置标签策略,您需要转到窗口>偏好> Javascript>代码风格> Formatter ,创建一个新的配置文件,编辑它并将Tab策略设置为仅限空格。现在使用tab键时插入空格。

I am not exactly sure where you set the editor property "insert spaces as tabs". To set the tab policy you need to go to Window > Preferences > Javascript > Code Style > Formatter, create a new profile, edit it and set the Tab policy to "spaces only". Now when using the tab key spaces are inserted.

这篇关于如何更改Eclipse以在Javascript编辑器中使用空格而不是制表符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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