Its also possible for users to configure their editor/ide to accept a tab character as a series of individual spaces. I can't understand why more folks don't do this. They can still press their single button, but have the precision of the spaces in play.
VIM:
config file: ~/.vimrc
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
Its also possible for users to configure their editor/ide to accept a tab character as a series of individual spaces. I can't understand why more folks don't do this. They can still press their single button, but have the precision of the spaces in play.
VIM:
config file:
~/.vimrc
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 4set softtabstop=4
" Sets the number of columns for a TABset expandtab
" Expand TABs to spacesYeah, in VSCode my tab key = 2 spaces. I don't use vim as much but I'll be adding that to my config. 👍🏼
Didnt know that, saved me some effort😋