From 0f918d94f63116b26521fe1c19546bd0dd7bd64a Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 3 Jan 2013 19:43:08 -0500 Subject: [PATCH] Skip POD comments --- plugin/sleuth.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) 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