Coffering unexpectedly INDENT

Sometimes, when I edit coffeescript files in Sublime text2, I get errors when compiling it in js:

error: unexpected INDENT $.post url, 

In the exalted text2 editor, I see the actual indentation:

Code print screent

But if I copy this code into a regular editor, I see the wrong indentation:

 click: -> debugger; # delete org here $.post url, 

debugger; line has an incorrect extra indent.

So, how to enjoy editing coffeescript files in sublime text 2? I installed the coffeescript package in a sublime way.

My Preferences.sublime-settings file is as follows:

 { "auto_indent": true, "auto_match_enabled": true, "detect_indentation": true, "draw_centered": false, "font_size": 11.0, "ignored_packages": [ "Better CoffeeScript", "Vintage" ], "indent_guide_options": [ "draw_active" ], "indent_subsequent_lines": true, "indent_to_bracket": true, "smart_indent": true, "tab_size": 2, "translate_tabs_to_spaces": true, "trim_automatic_white_space": true, "use_tab_stops": true, "word_wrap": "auto", "wrap_width": 0 } 
+4
source share
1 answer

It looks like you are mixing tabs and spaces. Choose View->Indentation and make sure Indent Using Spaces , then click Convert Indentation to Spaces and everything should be installed.

+13
source

Source: https://habr.com/ru/post/1491789/