diff --git a/doc/sleuth.txt b/doc/sleuth.txt index e187cc9..ef5c7b3 100644 --- a/doc/sleuth.txt +++ b/doc/sleuth.txt @@ -17,4 +17,11 @@ current and parent directories. In lieu of adjusting 'softtabstop', *:Sleuth* :Sleuth Manually detect indentation. +SETTINGS *sleuth-settings* + +Automatic detection of buffer options can be controlled with: +> + let g:sleuth_automatic = 0 +< + vim:tw=78:et:ft=help:norl: diff --git a/plugin/sleuth.vim b/plugin/sleuth.vim index 276d9f7..bfba50e 100644 --- a/plugin/sleuth.vim +++ b/plugin/sleuth.vim @@ -163,7 +163,7 @@ endif augroup sleuth autocmd! - autocmd FileType * call s:detect() + autocmd FileType * if get(g:, 'sleuth_automatic', 1) | call s:detect() | endif augroup END command! -bar -bang Sleuth call s:detect()