Skip POD comments

This commit is contained in:
Tim Pope 2013-01-03 19:43:08 -05:00
parent 4bae3d4618
commit 0f918d94f6
1 changed files with 11 additions and 0 deletions

View File

@ -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