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

查看:22
本文介绍了如何更改 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?

推荐答案

我不确定你在哪里设置了编辑器属性插入空格作为制表符".要设置选项卡策略,您需要转到 Window >偏好>Javascript >代码风格 >格式化程序,创建一个新的配置文件,编辑它并将选项卡策略设置为仅限空格".现在在使用 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天全站免登陆