Vim

~/.vimrc

set encoding=utf-8
set autoindent
set expandtab
set shiftwidth=4
set tabstop=4
set softtabstop=4

Sources: