<commit_before><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=1024, user-scalable=no">

  <title>San Diego JavaScript Presentation: EditorConfig</title>

  <link rel="stylesheet" href="style.min.css">
  <script src="scripts/modernizr.custom.js"></script>
</head>
<body class="deck-container">

<section class="slide" id="title">
  <header class="vcenter">
    <h1>EditorConfig</h1>
    <h2>Presented by <NAME></h2>
  </header>
  <footer>
    Provided under <a href="http://th.mit-license.org/">MIT license</a>.
    Available <a href="https://www.github.com/treyhunner/editorconfig-slides">on Github</a>.
    Artwork by <a href="http://www.squirrelmuffins.com">Kat On</a>.
  </footer>
  <img src="images/edcon_logo.png" class="icon">
</section>

<section class="slide" id="manifesto">
  <h2>The Manifesto</h2>
  <img src="images/edcon_che.png" class="icon">
  <ul>
    <li>
    <h3>You <em>need</em> a code style</h3>
    <p>I don't care what style you use, but please pick a style and use it consistently.</p>
    </li>
    <li>
    <h3>Your code, your rules</h3>
    <p>If I contribute code to your project I must obey the existing code style.</p>
    </li>
    <li>
    <h3>Don't argue about tabs and spaces</h3>
    <p>It's 2013.  Your text editor should be handling this for you.</p>
    </li>
    <li>
    <h3>Everything should be automated</h3>
    <p><a href="http://bugs.jquery.com/ticket/11777">Tabs, spaces, whatever. Let the computer figure it out.</a></p>
    </li>
  </ul>
</section>

<section class="slide" id="solution">
  <h2>The Solution: EditorConfig</h2>
  <img src="images/edcon_plugin.png" class="icon">
  <ol>
    <li>
    <h3>Add an <tt>.editorconfig</tt> file</h3>
    <p>Drop an <tt>.editorconfig</tt> file in your project.  This specifies the code style for your files.</p>
    </li>
    <li>
    <h3>Download an EditorConfig plugin</h3>
    <p>Download an EditorConfig plugin for your text editor.</p>
    </li>
    <li>
    <h3>Problem solved</h3>
    <p>Really, that's it.  You've just trained your editor to keep you in line.</p>
    </li>
  </ol>
</section>

<section class="slide" id="demo">
  <h2>Example</h2>

  <div class="demo">
    <div id="editorconfig">
      <h3>EditorConfig File</h3>
      <input name="filename" value="/home/trey/somewebsite/.editorconfig" spellcheck="false">
      <textarea name="file" spellcheck="false">[*]
trim_trailing_whitespace = true
insert_final_newline = true

[*.{css,html,js}]
indent_style = space
indent_size = 2

[*.py]
indent_style = space
indent_size = 4
</textarea>
    </div>

    <div id="output">
      <h3>Enforced Style for a Given File</h3>
      <input name="filename" value="/home/trey/somewebsite/index.html" spellcheck="false">
      <pre class="properties"></pre>
    </div>
  </div>
</section>

<section class="slide" id="usage-scenarios-1">
  <h2>Alternative Usage Scenarios</h2>
  <h3>Put a <tt>.editorconfig</tt> outside projects that don't use one.</h3>
  <pre>[jshint/**.js]
indent_style = tab

[moment/**.js]
indent_style = space
indent_size = 4

[jquery-pjax/**.js]
indent_style = space
indent_size = 2</pre>
  <a href="#" class="demo-link">Demo</a>
  <input type="hidden" value="/home/trey/projects/.editorconfig">
</section>

<section class="slide" id="usage-scenarios-2">
  <h2>Alternative Usage Scenarios</h2>
  <h3>Put a <tt>.editorconfig</tt> file in your home directory</h3>
  <pre># no .editorconfig files above my home directory!
root = true

[*.{rb,yml,html,css,scss,js}]
indent_style = space
indent_size = 2

[*.{py,md,rst,sh,c,h}]
indent_style = space
indent_size = 4

[Makefile]
indent_style = tab</pre>
  <a href="#" class="demo-link">Demo</a>
  <input type="hidden" value="/home/trey/.editorconfig">
</section>

<section class="slide" id="libraries">
  <h2>Libraries and Tools</h2>
  <img src="images/edcon_tool.png" class="icon">
  <ul>
    <li><h3>EditorConfig Libraries</h3><ul>
      <li>C, C++, C#, Objective C</li>
      <li>Python</li>
      <li>Java</li>
      <li>JavaScript</li>
    </ul></li>
    <li>
      <h3>EditorConfig support for Code Painter JS beautifier</h3>
      <p><a href="https://github.com/jedhunsaker/codepainter">https://github.com/jedhunsaker/codepainter</a></p>
    </li>
    <li>
    <h3>EditorConfig conformance checker</h3>
    <p><a href="https://github.com/treyhunner/editorconfig-tools">https://github.com/treyhunner/editorconfig-tools</a></p>
  </ul>
</section>

<section class="slide" id="editor-support">
  <h2>Current Editor Support</h2>
  <ul class="editor-logos">
    <li><a href="https://github.com/editorconfig/editorconfig-jetbrains#readme"><img src="logos/pyCharm.png" title="PyCharm"><span>PyCharm</span></a></li><commit_msg>Remove recommendation to add .editorconfig to ~/<commit_after><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=1024, user-scalable=no">

  <title>San Diego JavaScript Presentation: EditorConfig</title>

  <link rel="stylesheet" href="style.min.css">
  <script src="scripts/modernizr.custom.js"></script>
</head>
<body class="deck-container">

<section class="slide" id="title">
  <header class="vcenter">
    <h1>EditorConfig</h1>
    <h2>Presented by <NAME></h2>
  </header>
  <footer>
    Provided under <a href="http://th.mit-license.org/">MIT license</a>.
    Available <a href="https://www.github.com/treyhunner/editorconfig-slides">on Github</a>.
    Artwork by <a href="http://www.squirrelmuffins.com">Kat On</a>.
  </footer>
  <img src="images/edcon_logo.png" class="icon">
</section>

<section class="slide" id="manifesto">
  <h2>The Manifesto</h2>
  <img src="images/edcon_che.png" class="icon">
  <ul>
    <li>
    <h3>You <em>need</em> a code style</h3>
    <p>I don't care what style you use, but please pick a style and use it consistently.</p>
    </li>
    <li>
    <h3>Your code, your rules</h3>
    <p>If I contribute code to your project I must obey the existing code style.</p>
    </li>
    <li>
    <h3>Don't argue about tabs and spaces</h3>
    <p>It's 2013.  Your text editor should be handling this for you.</p>
    </li>
    <li>
    <h3>Everything should be automated</h3>
    <p><a href="http://bugs.jquery.com/ticket/11777">Tabs, spaces, whatever. Let the computer figure it out.</a></p>
    </li>
  </ul>
</section>

<section class="slide" id="solution">
  <h2>The Solution: EditorConfig</h2>
  <img src="images/edcon_plugin.png" class="icon">
  <ol>
    <li>
    <h3>Add an <tt>.editorconfig</tt> file</h3>
    <p>Drop an <tt>.editorconfig</tt> file in your project.  This specifies the code style for your files.</p>
    </li>
    <li>
    <h3>Download an EditorConfig plugin</h3>
    <p>Download an EditorConfig plugin for your text editor.</p>
    </li>
    <li>
    <h3>Problem solved</h3>
    <p>Really, that's it.  You've just trained your editor to keep you in line.</p>
    </li>
  </ol>
</section>

<section class="slide" id="demo">
  <h2>Example</h2>

  <div class="demo">
    <div id="editorconfig">
      <h3>EditorConfig File</h3>
      <input name="filename" value="/home/trey/somewebsite/.editorconfig" spellcheck="false">
      <textarea name="file" spellcheck="false">[*]
trim_trailing_whitespace = true
insert_final_newline = true

[*.{css,html,js}]
indent_style = space
indent_size = 2

[*.py]
indent_style = space
indent_size = 4
</textarea>
    </div>

    <div id="output">
      <h3>Enforced Style for a Given File</h3>
      <input name="filename" value="/home/trey/somewebsite/index.html" spellcheck="false">
      <pre class="properties"></pre>
    </div>
  </div>
</section>

<section class="slide" id="usage-scenarios-1">
  <h2>Alternative Usage Scenarios</h2>
  <h3>Put a <tt>.editorconfig</tt> outside projects that don't use one.</h3>
  <pre>[jshint/**.js]
indent_style = tab

[moment/**.js]
indent_style = space
indent_size = 4

[jquery-pjax/**.js]
indent_style = space
indent_size = 2</pre>
  <a href="#" class="demo-link">Demo</a>
  <input type="hidden" value="/home/trey/projects/.editorconfig">
</section>

<section class="slide" id="libraries">
  <h2>Libraries and Tools</h2>
  <img src="images/edcon_tool.png" class="icon">
  <ul>
    <li><h3>EditorConfig Libraries</h3><ul>
      <li>C, C++, C#, Objective C</li>
      <li>Python</li>
      <li>Java</li>
      <li>JavaScript</li>
    </ul></li>
    <li>
      <h3>EditorConfig support for Code Painter JS beautifier</h3>
      <p><a href="https://github.com/jedhunsaker/codepainter">https://github.com/jedhunsaker/codepainter</a></p>
    </li>
    <li>
    <h3>EditorConfig conformance checker</h3>
    <p><a href="https://github.com/treyhunner/editorconfig-tools">https://github.com/treyhunner/editorconfig-tools</a></p>
  </ul>
</section>

<section class="slide" id="editor-support">
  <h2>Current Editor Support</h2>
  <ul class="editor-logos">
    <li><a href="https://github.com/editorconfig/editorconfig-jetbrains#readme"><img src="logos/pyCharm.png" title="PyCharm"><span>PyCharm</span></a></li>
{'fraction_non_alphanumeric': 0.1849945235487404, 'fraction_numerical': 0.01434830230010953, 'mean_word_length': 3.8881156316916488, 'pattern_counts': {'":': 0, '<': 366, '<?xml version=': 0, '>': 366, 'https://': 12, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1613873', 'n_tokens_mistral': 3452, 'n_tokens_neox': 3340, 'n_words': 741}