aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/detect_indent.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/autoload/detect_indent.vim b/autoload/detect_indent.vim
index 71a43e8..feaa5f9 100644
--- a/autoload/detect_indent.vim
+++ b/autoload/detect_indent.vim
@@ -6,6 +6,11 @@ endfunction
" Entry point for plugin
function! detect_indent#() abort
+ " If this is a special buffer, don't do anything
+ if index(['nofile', 'quickfix', 'help'], &buftype) >= 0
+ return
+ endif
+
" For spaces, we count both the total space-indented lines, and also the
" count of lines indexed by space count, so that if we need to, we can
" figure out a good 'shiftwidth' setting; for tabs, we just count the