Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>TextMate is probably the <em>best</em> editor for CoffeeScript, with a bundle maintained by CoffeeScript creator Jeremy Ashkenas. (The bundle is also compatible with <a href="http://www.sublimetext.com/2" rel="nofollow noreferrer">Sublime Text 2</a>, which is a nice cross-platform alternative.) The solution here is to:</p> <ol> <li>Convert all tabs to spaces in your existing files (as Jeremy suggested in his comment), and</li> <li>Switch to <strong>Soft Tabs</strong> using this switcher at the bottom of the window:</li> </ol> <p><img src="https://i.stack.imgur.com/6lmig.png" alt="enter image description here"></p> <p>That way, when you hit the Tab key, the number of specified spaces is inserted. By avoiding the use of actual tab characters, you avoid the inevitable confusion that results from <em>n</em> spaces looking the same to a human as <em>1</em> tab, but being ambiguous to the compiler.</p> <p>The norm in the CoffeeScript community is 2 spaces, but there are plenty of folks using 4 spaces (which is the official standard in Python-land); just pick one and stick with it.</p> <p>If you do decide to make the switch to Sublime Text 2, you can add these lines to your <code>Base File.sublime-settings</code> preferences file to force soft tabs with the given number of spaces:</p> <pre><code>"tab_size": 2, "translate_tabs_to_spaces": true, </code></pre> <p>In sum: Hard tabs and languages with significant whitespace don't mix. Configure your editor to use soft tabs, and CoffeeScript responsibly. :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload