From 896b2f58b64e6b35a014304ea27d003355326ed9 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 20 Nov 2020 18:58:39 -0800 Subject: [PATCH] Added filetype autocommands for tab size --- vimrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vimrc b/vimrc index fb34f26..0c24c70 100644 --- a/vimrc +++ b/vimrc @@ -220,6 +220,16 @@ nnoremap :set list! command -nargs=1 F :r !figlet command -nargs=1 Ff :r !figlet -f small +nnoremap :set tabstop=4 shiftwidth=4 noexpandtab +nnoremap :set tabstop=8 shiftwidth=8 noexpandtab + + +" 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 + " ____ _ _ " | _ \| |_ _ __ _(_)_ __ ___