From 9a106c73f64b16f898276ca87cd55326a2e5cf4c Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Tue, 28 Mar 2017 17:35:55 +0300 Subject: [PATCH] feat: Allow exclude files with no 'filetype' set Closes #135 & #122 --- autoload/indent_guides.vim | 2 +- doc/indent_guides.txt | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/autoload/indent_guides.vim b/autoload/indent_guides.vim index e129442..99bf52f 100644 --- a/autoload/indent_guides.vim +++ b/autoload/indent_guides.vim @@ -286,7 +286,7 @@ function! indent_guides#exclude_filetype() abort return 1 endif endif - for ft in split(&ft, '\.') + for ft in split(&ft, '\.', 1) if index(g:indent_guides_exclude_filetypes, ft) > -1 return 1 end diff --git a/doc/indent_guides.txt b/doc/indent_guides.txt index 274482d..9e88276 100644 --- a/doc/indent_guides.txt +++ b/doc/indent_guides.txt @@ -180,7 +180,8 @@ Default: 0. Values: 0 or 1 < ------------------------------------------------------------------------------ *'indent_guides_exclude_filetypes'* -Use this option to specify a list of filetypes to disable the plugin for. +Use this option to specify a list of filetypes to disable the plugin for. Use +'' for files with no filetypes set. Default: ['help']. Values: list of strings. > @@ -273,8 +274,9 @@ Bug reports, feedback, suggestions etc are welcomed. 7. CHANGELOG *indent-guides-changelog* 1.8 (pending release)~ + * Allow exclude files with no 'filetype' set (thanks @noscript). * Added option g:|indent_guides_soft_pattern| to control the pattern for - soft indentation (thanks @sergey-vlasov). + soft indentation (thanks @noscript). * Added option g:|indent_guides_default_mapping| to control whether the default mapping (ig) gets set (thanks @suy). * Set size of indent guide to `tabstop` value when `shiftwidth=0` or