From 48b4f233c57f1439e8c2381fb91d36641ea146eb Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Fri, 4 Sep 2020 19:02:39 +0200 Subject: Fix detecting indentation in some CSS This is done by ignoring lines that don't have any alphanumeric characters, e.g. following would be detected as 4-spaces indentation instead of 2-spaces .android { height: 404px; width: 334px; margin: 100px auto; } https://github.com/tpope/vim-sleuth/issues/22 --- plugin/polyglot.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugin') diff --git a/plugin/polyglot.vim b/plugin/polyglot.vim index bcf255f0..bb31dc07 100644 --- a/plugin/polyglot.vim +++ b/plugin/polyglot.vim @@ -36,7 +36,7 @@ function! s:guess(lines) abort let spaces_minus_tabs = 0 for line in a:lines - if !len(line) || line =~# '^\s*$' + if !len(line) || line =~# '^\W*$' continue endif -- cgit v1.2.3