Sublimetext2 如何让JSHint smarttabs选项在Sublime Text 2中工作
我似乎无法让升华文本2升华浏览器包停止显示“混合标签和空格”警告 我已经设置了“smarttabs”:在设置中为true,但它仍然不起作用 还有其他人解决了这个问题吗 以下是我的SublimeLiner软件包的用户设置:Sublimetext2 如何让JSHint smarttabs选项在Sublime Text 2中工作,sublimetext2,jshint,Sublimetext2,Jshint,我似乎无法让升华文本2升华浏览器包停止显示“混合标签和空格”警告 我已经设置了“smarttabs”:在设置中为true,但它仍然不起作用 还有其他人解决了这个问题吗 以下是我的SublimeLiner软件包的用户设置: 谢谢。我这样解决问题 首先,不要在文件中使用混合选项卡和空格。只使用空格。Sublime可以很好地处理缩进,而无需硬制表符 将升华文本2设置为仅使用空格: // Tab and whitespace handling. // Indent using spaces, 4 spa
谢谢。我这样解决问题 首先,不要在文件中使用混合选项卡和空格。只使用空格。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,
如果遇到任何带有混合制表符和空格的旧文件,则只能从“视图>缩进>将制表符转换为空格”菜单将其转换为空格
为什么制表符在源代码中不好
- 我这样解决问题
首先,不要在文件中使用混合选项卡和空格。只使用空格。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,
如果遇到任何带有混合制表符和空格的旧文件,则只能从“视图>缩进>将制表符转换为空格”菜单将其转换为空格
为什么制表符在源代码中不好
- 我也有同样的问题,也许我找到了原因
smarttabs
选项可以控制空格后的警告,但不能控制空格后的警告,您可以尝试
如果要禁用警告,可以在文件顶部添加注释
/*jshint-W099*/
我也有同样的问题,也许我找到了原因
smarttabs
选项可以控制空格后的警告,但不能控制空格后的警告,您可以尝试
如果要禁用警告,可以在文件顶部添加注释
/*jshint-W099*/