PymodePython from pymode.lint import code_checkcall pymode#tools#signs#init()call pymode#tools#loclist#init()fun! pymode#lint#auto() "{{{if ! pymode#save()return 0endifPymodePython from pymode import autoPymodePython auto()cclosecall g:PymodeSigns.clear()editcall pymode#wide_message("AutoPep8 done.")endfunction "}}}fun! pymode#lint#show_errormessage() "{{{let loclist = g:PymodeLocList.current()if loclist.is_empty()returnendiflet l = line('.')if l == b:pymode_error_linereturnendiflet b:pymode_error_line = lif has_key(loclist._messages, l)call pymode#wide_message(loclist._messages[l])elseechoendifendfunction "}}}fun! pymode#lint#toggle() "{{{let g:pymode_lint = g:pymode_lint ? 0 : 1if g:pymode_lintcall pymode#wide_message("Code checking is enabled.")elsecall pymode#wide_message("Code checking is disabled.")endifendfunction "}}}fun! pymode#lint#check() "{{{" DESC: Run checkers on current file."let loclist = g:PymodeLocList.current()let b:pymode_error_line = -1call loclist.clear()call pymode#wide_message('Code checking is running ...')PymodePython code_check()if loclist.is_empty()call pymode#wide_message('Code checking is completed. No errors found.')call g:PymodeSigns.refresh(loclist)call loclist.show()returnendifcall g:PymodeSigns.refresh(loclist)call loclist.show()call pymode#lint#show_errormessage()call pymode#wide_message('Found ' . loclist.num_errors() . ' error(s) and ' . loclist.num_warnings() . ' warning(s)')endfunction " }}}fun! pymode#lint#tick_queue() "{{{python import timepython print time.time()if mode() == 'i'if col('.') == 1call feedkeys("\<Right>\<Left>", "n")elsecall feedkeys("\<Left>\<Right>", "n")endifelsecall feedkeys("f\e", "n")endifendfunction "}}}fun! pymode#lint#stop() "{{{au! pymode CursorHold <buffer>endfunction "}}}fun! pymode#lint#start() "{{{au! pymode CursorHold <buffer> call pymode#lint#tick_queue()call pymode#lint#tick_queue()endfunction "}}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。