diff options
| author | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-04 19:45:47 +0200 | 
|---|---|---|
| committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-04 19:45:47 +0200 | 
| commit | b0124dc88082f5ed8c96faa16d3b334d38f5949f (patch) | |
| tree | 33a4a0ab3e63d3382ac303c3babf88cf9419bdcf /plugin | |
| parent | 99166bd51f2f4f304f03ba762ab4067b00d55bbe (diff) | |
| download | vim-polyglot-4.9.2.tar.gz vim-polyglot-4.9.2.zip | |
Ignore files from homedir and root for indentv4.9.2
https://github.com/tpope/vim-sleuth/pull/57
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/polyglot.vim | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/plugin/polyglot.vim b/plugin/polyglot.vim index fad7609b..762e4fcd 100644 --- a/plugin/polyglot.vim +++ b/plugin/polyglot.vim @@ -138,6 +138,10 @@ function! s:detect_indent() abort    let dir = expand('%:p:h')    let level = 3    while isdirectory(dir) && dir !=# fnamemodify(dir, ':h') && level > 0 +    " Ignore files from homedir and root  +    if dir == expand('~') || dir == '/' +      return +    endif      for neighbor in glob(dir . '/' . pattern, 0, 1)[0:level]        " Do not consider directories above .git, .svn or .hg        if fnamemodify(neighbor, ":h:t")[0] == "." | 
