diff --git a/plugin/sleuth.vim b/plugin/sleuth.vim index cdff856..9257bf7 100644 --- a/plugin/sleuth.vim +++ b/plugin/sleuth.vim @@ -12,6 +12,7 @@ function! s:guess(lines) abort let options = {} let heuristics = {'spaces': 0, 'hard': 0, 'soft': 0} let ccomment = 0 + let podcomment = 0 for line in a:lines @@ -29,6 +30,16 @@ function! s:guess(lines) abort continue endif + if line =~# '^=\w' + let podcomment = 1 + endif + if podcomment + if line =~# '^=\%(end\|cut\)\>' + let podcomment = 0 + endif + continue + endif + let softtab = repeat(' ', 8) if line =~# '^\t' let heuristics.hard += 1