Added filetype autocommands for tab size

master
Mark 2020-11-20 18:58:39 -08:00
parent 50233e0b81
commit 896b2f58b6
1 changed files with 10 additions and 0 deletions

10
vimrc
View File

@ -220,6 +220,16 @@ nnoremap <C-k> :set list! <CR>
command -nargs=1 F :r !figlet <q-args><CR>
command -nargs=1 Ff :r !figlet -f small <q-args><CR>
nnoremap <C-p> :set tabstop=4 shiftwidth=4 noexpandtab<CR>
nnoremap <C-o> :set tabstop=8 shiftwidth=8 noexpandtab<CR>
" Autodetect filetypes and set proper indentation
" Default: 8
:set tabstop=8 shiftwidth=8 noexpandtab
:autocmd Filetype py setlocal tabstop=4 shiftwidth=4 noexpandtab
:autocmd Filetype lua setlocal tabstop=4 shiftwidth=4 noexpandtab
" ____ _ _
" | _ \| |_ _ __ _(_)_ __ ___