diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-04 19:02:39 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-04 19:02:39 +0200 |
commit | 48b4f233c57f1439e8c2381fb91d36641ea146eb (patch) | |
tree | bdeab62c2b65262acfc09e96d9cfc66466d289e2 | |
parent | 556ba05ceeb3e1053c2a99a303a13b2b8e82f0f9 (diff) | |
download | vim-polyglot-48b4f233c57f1439e8c2381fb91d36641ea146eb.tar.gz vim-polyglot-48b4f233c57f1439e8c2381fb91d36641ea146eb.zip |
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
-rw-r--r-- | plugin/polyglot.vim | 2 |
1 files changed, 1 insertions, 1 deletions
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 |