vim set tab size
:set tabstop=2 shiftwidth=2 expandtab
:retab
# tabstop -> Indentation width in spaces
# shiftwidth -> Autoindentation width in spaces
# expandtab -> Use actual spaces instead of tabs
# retab -> Convert existing tabs to spaces
vim set tab size
:set tabstop=2 shiftwidth=2 expandtab
:retab
# tabstop -> Indentation width in spaces
# shiftwidth -> Autoindentation width in spaces
# expandtab -> Use actual spaces instead of tabs
# retab -> Convert existing tabs to spaces
how to enable 4 space tab on vim
set tabstop=4 " The width of a TAB is set to 4.
" Still it is a \t. It is just that
" Vim will interpret it to be having
" a width of 4.
set shiftwidth=4 " Indents will have a width of 4.
set softtabstop=4 " Sets the number of columns for a TAB.
set expandtab " Expand TABs to spaces.
filetype plugin indent on " Use filetype detection and file-based automatic indenting.
Source: Stackoverflow.com
Author: Shervin Emami.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us