From bea19b446167920ba1002586a83612b730c67aba Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Sat, 25 Mar 2017 13:56:49 +0800 Subject: [PATCH] Reset value on cmd --- tools/chinese_linter.vim | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/chinese_linter.vim b/tools/chinese_linter.vim index d689005..7b055bb 100644 --- a/tools/chinese_linter.vim +++ b/tools/chinese_linter.vim @@ -1,9 +1,4 @@ scriptencoding utf-8 -let s:file = [] -let s:linenr = 0 -let s:colnr = 0 -let s:qf = [] -let s:bufnr = 0 let s:ERRORS = { \ 'E001' : ['中文字符后使用英文标点', '[^a-zA-Z],'], \ } @@ -12,6 +7,9 @@ command! -nargs=? CheckChinese call s:check() function! s:check(...) abort let s:file = getline(1,'$') let s:bufnr = bufnr('$') + let s:linenr = 0 + let s:colnr = 0 + let s:qf = [] for l:line in s:file let s:linenr += 1 call s:parser(l:line)