" vi: fdl=1let g:pymode_version = "0.9.0"com! PymodeVersion echomsg "Current python-mode version: " . g:pymode_versioncom! PymodeTroubleshooting call pymode#troubleshooting#test()" Enable pymode by default :)call pymode#default('g:pymode', 1)call pymode#default('g:pymode_debug', 0)" DESC: Disable script loadingif !g:pymode || &cpfinishendif" Pymode needsfiletype plugin on" OPTIONS: {{{" Vim Python interpreter. Set to 'disable' for remove python features.call pymode#default('g:pymode_python', '')" Disable pymode warningscall pymode#default('g:pymode_warning', 1)" Additional python pathscall pymode#default('g:pymode_paths', [])" Python documentation supportcall pymode#default('g:pymode_doc', 1)call pymode#default('g:pymode_doc_bind', 'K')" Enable/Disable pymode PEP8 indentationcall pymode#default("g:pymode_indent", 1)" Enable/disable pymode folding for pyfiles.call pymode#default("g:pymode_folding", 1)" Maximum file length to check for nested class/def statementscall pymode#default("g:pymode_folding_nest_limit", 1000)" Change for folding customization (by example enable fold for 'if', 'for')call pymode#default("g:pymode_folding_regex", '^\s*\%(class\|def\|async\s\+def\) \w\+')" Enable/disable python motion operatorscall pymode#default("g:pymode_motion", 1)" Auto remove unused whitespaces on savecall pymode#default("g:pymode_trim_whitespaces", 1)" Set recomended python optionscall pymode#default("g:pymode_options", 1)call pymode#default("g:pymode_options_max_line_length", 80)call pymode#default("g:pymode_options_colorcolumn", 1)" Enable/disable vertical display of python documentationcall pymode#default("g:pymode_doc_vertical", 0)" Minimal height of pymode quickfix windowcall pymode#default('g:pymode_quickfix_maxheight', 6)" Maximal height of pymode quickfix windowcall pymode#default('g:pymode_quickfix_minheight', 3)" LOAD VIRTUALENV {{{"" Enable virtualenv supportcall pymode#default('g:pymode_virtualenv', 1)" Get path to virtualenv (by default take from shell)call pymode#default('g:pymode_virtualenv_path', $VIRTUAL_ENV)" Service variable (don't set it manually)call pymode#default('g:pymode_virtualenv_enabled', '')" }}}" RUN PYTHON {{{"" Enable code running supportcall pymode#default('g:pymode_run', 1)" Key's map for run python codecall pymode#default('g:pymode_run_bind', '<leader>r')" }}}" CHECK CODE {{{"" Code checkingcall pymode#default('g:pymode_lint', 1)" Check code asynchronouslycall pymode#default('g:pymode_lint_async', 1)call pymode#default('g:pymode_lint_async_updatetime', 1000)" Check code every save if file has been modifiedcall pymode#default("g:pymode_lint_on_write", 1)" Check code every save (every)call pymode#default("g:pymode_lint_unmodified", 0)" Check code on flycall pymode#default("g:pymode_lint_on_fly", 0)" Show message about error in command linecall pymode#default("g:pymode_lint_message", 1)" Choices are: pylint, pyflakes, pep8, mccabecall pymode#default("g:pymode_lint_checkers", ['pyflakes', 'pep8', 'mccabe'])" Skip errors and warnings (e.g. E4,W)call pymode#default("g:pymode_lint_ignore", "")" Select errors and warnings (e.g. E4,W)call pymode#default("g:pymode_lint_select", "")" Auto open cwindow if any errors has been findedcall pymode#default("g:pymode_lint_cwindow", 1)" If not emply, errors will be sort by defined relevance" E.g. let g:pymode_lint_sort = ['E', 'C', 'I'] " Errors first 'E'," after them 'C' and ...call pymode#default("g:pymode_lint_sort", [])" Place error signscall pymode#default("g:pymode_lint_signs", 1)" Symbol's definitionscall pymode#default("g:pymode_lint_todo_symbol", "WW")call pymode#default("g:pymode_lint_docs_symbol", "DD")call pymode#default("g:pymode_lint_comment_symbol", "CC")call pymode#default("g:pymode_lint_visual_symbol", "RR")call pymode#default("g:pymode_lint_error_symbol", "EE")call pymode#default("g:pymode_lint_info_symbol", "II")call pymode#default("g:pymode_lint_pyflakes_symbol", "FF")" Code checkers optionscall pymode#default("g:pymode_lint_options_pep8",\ {'max_line_length': g:pymode_options_max_line_length})call pymode#default("g:pymode_lint_options_pylint",\ {'max-line-length': g:pymode_options_max_line_length})call pymode#default("g:pymode_lint_options_mccabe",\ {'complexity': 12})call pymode#default("g:pymode_lint_options_pep257", {})call pymode#default("g:pymode_lint_options_pyflakes", { 'builtins': '_' })" }}}" SET/UNSET BREAKPOINTS {{{"" Create/remove breakpointscall pymode#default('g:pymode_breakpoint', 1)" Key's map for add/remove breakpointcall pymode#default('g:pymode_breakpoint_bind', '<leader>b')" Default pattern for making breakpoints. Leave this empty for auto search available debuggers (pdb, ipdb, ...)call pymode#default('g:pymode_breakpoint_cmd', '')" }}}" ROPE (refactoring, codeassist) {{{"" Rope supportcall pymode#default('g:pymode_rope', 1)" System plugin variablecall pymode#default('g:pymode_rope_current', '')" Configurable rope project rootcall pymode#default('g:pymode_rope_project_root', '')" Configurable rope project folder (always relative to project root)call pymode#default('g:pymode_rope_ropefolder', '.ropeproject')" If project hasnt been finded in current working directory, look at parents directorycall pymode#default('g:pymode_rope_lookup_project', 0)" Enable Rope completioncall pymode#default('g:pymode_rope_completion', 1)" Complete keywords from not imported modules (could make completion slower)" Enable autoimport used modulescall pymode#default('g:pymode_rope_autoimport', 0)" Offer to import object after complete (if that not be imported before)call pymode#default('g:pymode_rope_autoimport_import_after_complete', 0)" Autoimported modulescall pymode#default('g:pymode_rope_autoimport_modules', ['os', 'shutil', 'datetime'])" Bind keys to autoimport module for object under cursorcall pymode#default('g:pymode_rope_autoimport_bind', '<C-c>ra')" Automatic completion on dotcall pymode#default('g:pymode_rope_complete_on_dot', 1)" Bind keys for autocomplete (leave empty for disable)call pymode#default('g:pymode_rope_completion_bind', '<C-Space>')" Bind keys for goto definition (leave empty for disable)call pymode#default('g:pymode_rope_goto_definition_bind', '<C-c>g')" set command for open definition (e, new, vnew)call pymode#default('g:pymode_rope_goto_definition_cmd', 'new')" Bind keys for show documentation (leave empty for disable)call pymode#default('g:pymode_rope_show_doc_bind', '<C-c>d')" Bind keys for find occurencies (leave empty for disable)call pymode#default('g:pymode_rope_find_it_bind', '<C-c>f')" Bind keys for organize imports (leave empty for disable)call pymode#default('g:pymode_rope_organize_imports_bind', '<C-c>ro')" Bind keys for rename variable/method/class in the project (leave empty for disable)call pymode#default('g:pymode_rope_rename_bind', '<C-c>rr')" Bind keys for rename modulecall pymode#default('g:pymode_rope_rename_module_bind', '<C-c>r1r')" Bind keys for convert module to packagecall pymode#default('g:pymode_rope_module_to_package_bind', '<C-c>r1p')" Creates a new function or method (depending on the context) from the selected linescall pymode#default('g:pymode_rope_extract_method_bind', '<C-c>rm')" Creates a variable from the selected linescall pymode#default('g:pymode_rope_extract_variable_bind', '<C-c>rl')" Inline refactoringcall pymode#default('g:pymode_rope_inline_bind', '<C-c>ri')" Move refactoringcall pymode#default('g:pymode_rope_move_bind', '<C-c>rv')" Generate functioncall pymode#default('g:pymode_rope_generate_function_bind', '<C-c>rnf')" Generate classcall pymode#default('g:pymode_rope_generate_class_bind', '<C-c>rnc')" Generate packagecall pymode#default('g:pymode_rope_generate_package_bind', '<C-c>rnp')" Change signaturecall pymode#default('g:pymode_rope_change_signature_bind', '<C-c>rs')" Tries to find the places in which a function can be used and changes the" code to call it insteadcall pymode#default('g:pymode_rope_use_function_bind', '<C-c>ru')" Regenerate project cache on every savecall pymode#default('g:pymode_rope_regenerate_on_write', 1)" }}}" }}}" Prepare to plugin loadingif &compatibleset nocompatibleendiffiletype plugin on" Disable python-related functionality" let g:pymode_python = 'disable'" let g:pymode_python = 'python3'" UltiSnips Fixesif !len(g:pymode_python)if exists('g:_uspy') && g:_uspy == ':py'let g:pymode_python = 'python'elseif exists('g:_uspy') && g:_uspy == ':py3'let g:pymode_python = 'python3'elseif has("python")let g:pymode_python = 'python'elseif has("python3")let g:pymode_python = 'python3'elselet g:pymode_python = 'disable'endifendifif g:pymode_python == 'python'command! -nargs=1 PymodePython python <args>let g:UltiSnipsUsePythonVersion = 2elseif g:pymode_python == 'python3'command! -nargs=1 PymodePython python3 <args>let g:UltiSnipsUsePythonVersion = 3elselet g:pymode_doc = 0let g:pymode_lint = 0let g:pymode_path = 0let g:pymode_rope = 0let g:pymode_run = 0let g:pymode_virtualenv = 0command! -nargs=1 PymodePython echo <args>endifcommand! PymodeVersion echomsg "Pymode version: " . g:pymode_version . " interpreter: " . g:pymode_python . " lint: " . g:pymode_lint . " rope: " . g:pymode_ropeaugroup pymode
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。