|
| 1 | +" DESC: Get debug information about pymode problem |
| 2 | +fun! pymode#troubleshooting#Test() "{{{ |
| 3 | + new |
| 4 | + setlocal buftype=nofile bufhidden=delete noswapfile nowrap |
| 5 | + call append('0', ['Pymode diagnostic', |
| 6 | + \ '===================', |
| 7 | + \ 'VIM:' . v:version . ' multi_byte:' . has('multi_byte') . ' pymode: ' . g:pymode_version, |
| 8 | + \ '']) |
| 9 | + |
| 10 | + let python = 1 |
| 11 | + let output = [] |
| 12 | + |
| 13 | + if !exists('#filetypeplugin') |
| 14 | + call append('$', ['WARNING: ', 'Python-mode required :filetype plugin indent on', '']) |
| 15 | + endif |
| 16 | + |
| 17 | + if !has('python') |
| 18 | + call append('$', ['WARNING: ', 'Python-mode required vim compiled with +python.', |
| 19 | + \ '"lint, rope, run, doc, virtualenv" features disabled.', '']) |
| 20 | + let python = 0 |
| 21 | + endif |
| 22 | + |
| 23 | + call append('$', 'Pymode variables:') |
| 24 | + call append('$', '-------------------') |
| 25 | + call append('$', 'pymode:' . g:pymode) |
| 26 | + call append('$', 'pymode_lint:' . g:pymode_lint) |
| 27 | + call append('$', 'pymode_rope:' . g:pymode_rope) |
| 28 | + call append('$', 'pymode_path:' . g:pymode_path) |
| 29 | + call append('$', 'pymode_doc:' . g:pymode_doc) |
| 30 | + call append('$', 'pymode_run:' . g:pymode_run) |
| 31 | + call append('$', 'pymode_virtualenv:' . g:pymode_virtualenv) |
| 32 | + call append('$', 'pymode_breakpoint:' . g:pymode_breakpoint) |
| 33 | + call append('$', 'pymode_path:' . g:pymode_path) |
| 34 | + call append('$', 'pymode_folding:' . g:pymode_folding) |
| 35 | + call append('$', 'pymode_syntax:' . g:pymode_syntax) |
| 36 | + call append('$', 'pymode_utils_whitespaces:' . g:pymode_utils_whitespaces) |
| 37 | + call append('$', 'pymode_options_indent:' . g:pymode_options_indent) |
| 38 | + call append('$', 'pymode_options_other:' . g:pymode_options_other) |
| 39 | + |
| 40 | + if len(g:pymode_virtualenv_enabled) |
| 41 | + call append('$', 'Enabled virtualenv:') |
| 42 | + call append('$', '-------------------') |
| 43 | + call append('$', g:pymode_virtualenv_enabled) |
| 44 | + call append('$', '') |
| 45 | + endif |
| 46 | + |
| 47 | + if python |
| 48 | + call append('$', 'VIM python paths:') |
| 49 | + call append('$', '-----------------') |
| 50 | +python << EOF |
| 51 | +vim.command('let l:output = %s' % repr(sys.path)) |
| 52 | +EOF |
| 53 | + call append('$', output) |
| 54 | + call append('$', '') |
| 55 | + endif |
| 56 | + |
| 57 | +endfunction "}}} |
0 commit comments