Skip to content

Commit

Permalink
Refactor indent tmpl templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhu committed Feb 13, 2016
1 parent 23f5616 commit 7ffa8f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions indent/gohtmltmpl.vim
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ function! GetGoHTMLTmplIndent(lnum)
" If need to indent based on last line
let last_line = getline(a:lnum-1)
if last_line =~ '^\s*{{\s*\%(if\|else\|range\|with\|define\|block\).*}}'
let ind = ind + sw
let ind += sw
endif

" End of FuncMap block
let current_line = getline(a:lnum)
if current_line =~ '^\s*{{\s*\%(else\|end\).*}}'
let ind = ind - sw
let ind -= sw
endif

return ind
Expand Down

0 comments on commit 7ffa8f2

Please sign in to comment.