how to set tab to 2 spaces in vim code example Example: vim tab 2 spaces set smartindent set tabstop=2 set expandtab set shiftwidth=2