Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It is perhaps a good idea not to use tabs at all.</p> <pre><code>:set expandtab </code></pre> <p>If you want to replace all the tabs in your file to 3 spaces (which will look pretty similar to <code>tabstop=3</code>):</p> <pre><code>:%s/^I/ / </code></pre> <p>(where <code>^I</code> is the <kbd>TAB</kbd> character)</p> <p>From the VIM online help:</p> <pre><code>'tabstop' 'ts' number (default 8) local to buffer Number of spaces that a &lt;Tab&gt; in the file counts for. Also see |:retab| command, and 'softtabstop' option. Note: Setting 'tabstop' to any other value than 8 can make your file appear wrong in many places (e.g., when printing it). There are four main ways to use tabs in Vim: 1. Always keep 'tabstop' at 8, set 'softtabstop' and 'shiftwidth' to 4 (or 3 or whatever you prefer) and use 'noexpandtab'. Then Vim will use a mix of tabs and spaces, but typing &lt;Tab&gt; and &lt;BS&gt; will behave like a tab appears every 4 (or 3) characters. 2. Set 'tabstop' and 'shiftwidth' to whatever you prefer and use 'expandtab'. This way you will always insert spaces. The formatting will never be messed up when 'tabstop' is changed. 3. Set 'tabstop' and 'shiftwidth' to whatever you prefer and use a |modeline| to set these values when editing the file again. Only works when using Vim to edit the file. 4. Always set 'tabstop' and 'shiftwidth' to the same value, and 'noexpandtab'. This should then work (for initial indents only) for any tabstop setting that people use. It might be nice to have tabs after the first non-blank inserted as spaces if you do this though. Otherwise aligned comments will be wrong when 'tabstop' is changed. </code></pre>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. 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