<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alexandrudima/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alexandrudima">@alexandrudima</a> on January 27, 2016 13:6</em></p>
<p dir="auto">Testing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="60046420" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/2218" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/TypeScript/pull/2218/hovercard" href="https://github.com/microsoft/TypeScript/pull/2218">#2218</a></p>
<p dir="auto">I have the following settings:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Place your settings in this file to overwrite default and user settings.
{
    &quot;typescript.tsdk&quot;: &quot;C:\\Alex\\salsa\\node_modules\\typescript\\lib&quot;,
    &quot;editor.tabSize&quot;: 4,
    &quot;editor.insertSpaces&quot;: false
}"><pre class="notranslate"><span class="pl-ii">// Place your settings in this file to overwrite default and user settings.</span>
{
    <span class="pl-ent">"typescript.tsdk"</span>: <span class="pl-s"><span class="pl-pds">"</span>C:<span class="pl-cce">\\</span>Alex<span class="pl-cce">\\</span>salsa<span class="pl-cce">\\</span>node_modules<span class="pl-cce">\\</span>typescript<span class="pl-cce">\\</span>lib<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"editor.tabSize"</span>: <span class="pl-c1">4</span>,
    <span class="pl-ent">"editor.insertSpaces"</span>: <span class="pl-c1">false</span>
}</pre></div>
<p dir="auto">If I have a function indented with 5 spaces, and choose format, the 5 spaces get replaced with a tab:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function howdyAgain(name) {
     return 'hi';
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">howdyAgain</span><span class="pl-kos">(</span><span class="pl-s1">name</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
     <span class="pl-k">return</span> <span class="pl-s">'hi'</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">If I have the same function indented with 4 spaces, and choose format, the 4 spaces do not get replaced with a tab:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function howdyAgain(name) {
    return 'hi';
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">howdyAgain</span><span class="pl-kos">(</span><span class="pl-s1">name</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-s">'hi'</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="129137702" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/2443" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/2443/hovercard" href="https://github.com/microsoft/vscode/issues/2443">microsoft/vscode#2443</a></em></p>
<p dir="auto">The formatter described in the link below currently doesn't seem to offer a way to indent by using tabs.<br>
<a href="https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#pretty-printer-using-the-ls-formatter">https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#pretty-printer-using-the-ls-formatter</a></p>
<p dir="auto">Could that be added?<br>
Thanks!</p>