" Set debugging functions." DESC: Get debug information about pymode problem.fun! pymode#debug#sysinfo() "{{{" OS info. {{{let l:os_name = "Unknown"if has('win16') || has('win32') || has('win64')let l:os_name = "Windows"elselet l:os_name = substitute(system('uname'), "\n", "", "")endifcall pymode#debug("Operating system: " . l:os_name)" }}}" Loaded scripts info. {{{call pymode#debug("Scriptnames:")let l:scriptnames_var = execute('scriptnames')" }}}" Variables info. {{{" Drop verbose file temporarily to prevent the 'let' from showing up.let l:tmp = &verbosefileset verbosefile=let l:all_variables = filter(\ split(execute('let', 'silent!'), '\n'),\ 'v:val =~ "^pymode"')let &verbosefile = l:tmp" NOTE: echom does not display multiline messages. Thus a for loop is" needed.call pymode#debug("Pymode variables:")for pymodevar in sort(l:all_variables)echom pymodevarendfor" }}}" Git commit info. {{{" Find in the scriptnames the first occurence of 'python-mode'. Then parse" the result outputting its path. This is in turn fed into the git command.call pymode#debug("Git commit: ")let l:pymode_folder = substitute(\ filter(\ split(l:scriptnames_var, '\n'),\ 'v:val =~ "/python-mode/"')[0],\ '\(^\s\+[0-9]\+:\s\+\)\([/~].*python-mode\/\)\(.*\)',\ '2円',\ '')let l:git_head_sha1 = system('git -C ' . expand(l:pymode_folder). ' rev-parse HEAD ' )echom join(filter(split(l:git_head_sha1, '\zs'), 'v:val =~? "[0-9A-Fa-f]"'), '')" }}}" Git submodules status. {{{call pymode#debug("Git submodule status:")let l:git_submodule_status = system('git -C ' . expand(l:pymode_folder). ' submodule status')for submodule in split(l:git_submodule_status, '\n')echom submoduleendfor" }}}call pymode#debug("End of pymode#debug#sysinfo")endfunction "}}}" DESC: Define debug folding function.function! pymode#debug#foldingexpr(lnum) "{{{let l:get_folding_result = pymode#folding#foldcase(a:lnum)" NOTE: the 'has folding:' expression is special in the pymode#debug.call pymode#debug(\ 'line ' . a:lnum\ . ' has folding: ' . l:get_folding_result['foldlevel']\ . ' with foldcase ' . l:get_folding_result['foldcase'])return l:get_folding_result['foldlevel']endfunction" }}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。