Skip to content

Commit

Permalink
Skip go-style backtick-quoted strings
Browse files Browse the repository at this point in the history
Fixes tpope#29
  • Loading branch information
lutzky committed Jun 7, 2015
1 parent 6b0c9d6 commit 563311e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plugin/sleuth.vim
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function! s:guess(lines) abort
let ccomment = 0
let podcomment = 0
let triplequote = 0
let backtick = 0

for line in a:lines

Expand Down Expand Up @@ -60,6 +61,15 @@ function! s:guess(lines) abort
let triplequote = 1
endif

if backtick
if line =~# '^[^`]*`[^`]*$'
let backtick = 0
endif
continue
elseif line =~# '^[^`]*`[^`]*$'
let backtick = 1
endif

let softtab = repeat(' ', 8)
if line =~# '^\t'
let heuristics.hard += 1
Expand Down

0 comments on commit 563311e

Please sign in to comment.