From 29ec69ffa095a16fe15e4c63c1a6ba90974efd74 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Fri, 23 Oct 2020 01:04:53 +0200 Subject: Set default tabstop to 2, but only if not changed --- ftdetect/polyglot.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 175575ba..6d495073 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -2634,6 +2634,10 @@ if !has_key(s:disabled_packages, 'autoindent') " Code below re-implements sleuth for vim-polyglot let g:loaded_sleuth = 1 + if &tabstop == 8 + let &tabstop = 2 + endif + func! s:get_shiftwidth(indents) abort let shiftwidth = 0 let max_count = 0 -- cgit v1.2.3