我似乎无法让Sublime Text 2 SublimeLinter软件包停止显示"混合制表符和空格"警告。
我已经设置了"智能选项卡":在设置中为 true,但它仍然没有采取。
还有其他人解决了这个问题吗?
以下是我对SublimeLinter软件包的用户设置:https://gist.github.com/3737558
谢谢。
我这样解决问题。
首先,不要在文件中使用混合制表符和空格。仅使用空格。Sublime 可以精细地处理缩进,而无需硬制表符。
将崇高文本 2 设置为仅使用空格:
// Tab and whitespace handling.
// Indent using spaces, 4 spaces ber indent by default, clean up extra whitespaces on save
"tab_size": 4,
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,
"trim_trailing_white_space_on_save": true,
// Do not try to detect the tab size from the opened file
"detect_indentation" : false,
如果您遇到任何具有混合制表符和空格的旧文件,则只能从"视图>缩进">"将制表符转换为空格"菜单中将它们转换为空格。
为什么制表符在源代码中是不好的
- http://opensourcehacker.com/2012/05/13/never-use-hard-tabs/
我有同样的问题,也许我找到了原因
smarttabs
选项可以控制空格后制表符时的警告,但不能控制空格后的警告选项卡,可以试试
如果要禁用警告,可以在文件顶部添加注释
/*jshint -W099*/