\s and whitespace in vim <pre><code>:%s/^\s\{4\}//g </code></pre> <p>It can replace four blank spaces at the beginning of a line with zero blank space. We draw the conclusion that <code>\s</code>=whitespace <code>\{4\}</code>=four times.</p> <pre><code>:%s/^\s\{4\}/ /g </code></pre> <p>It can replace four blank spaces at the beginning of a line with two blank spaces.<br> And it is obvious that <code>\s\{2\}</code>=two white spaces.</p> <pre><code>:%s/^\s\{4\}/\s\{2\}/g </code></pre> <p>Why the command can't replace four blank spaces at the beginning of a line with two blank spaces? Why the command means that to replace four blank spaces at the beginning of a line with s{2} ?</p>