Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Suggested edits for the help file.#119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
klen merged 1 commit intopython-mode:developfrombgrant:develop
Aug 15, 2012
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 76 additions & 64 deletionsdoc/pymode.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,12 +25,12 @@ CONTENTS *Python-mode-contents*
1. Intro ~
*PythonMode*

Python-mode is a vim plugin that allows you to use the pylint, rope, pydoc
library in vim to provide features like python codelooking for bugs,
refactoring and some other useful things.
Python-mode is a vim plugin that allows you to use the pylint, rope,andpydoc
libraries in vim to provide features like python codebug checking,
refactoring, and some other useful things.

This plugin allow you create python code in vim very easily. There is no need
to install the pylint or ropelibrary on your system.
to install the pylint or ropelibraries on your system.


==============================================================================
Expand All@@ -41,7 +41,7 @@ to install the pylint or rope library on your system.
Pylint options (ex. disable messages) may be defined in '$HOME/pylint.rc'
See pylint documentation.

The script provides the following options that can customise the behaviourthe
This script provides the following options that can customise the behaviourof
PythonMode. These options should be set in your vimrc.

|'pymode_paths'| Additional python paths for pymode
Expand DownExpand Up@@ -74,7 +74,7 @@ PythonMode. These options should be set in your vimrc.

|'pymode_lint_signs'| Place signs

|'pymode_lint_jump'| Auto jumpon first error
|'pymode_lint_jump'| Auto jumpto first error

|'pymode_lint_hold'| Hold cursor in current window

Expand DownExpand Up@@ -116,7 +116,7 @@ PythonMode. These options should be set in your vimrc.
2.1. Customisation details ~
*PythonModeOptionsDetails*

To enable any of thebelowoptions you should put the given line in your
To enable any of the options below you should put the given line in your
'$HOME/.vimrc'. See |vimrc-intro|.

------------------------------------------------------------------------------
Expand DownExpand Up@@ -157,7 +157,7 @@ This option set additional python import paths
Values: 0 or 1.
Default: 1.

If this option is set to 0 thendocs script is disabled.
If this option is set to 0 thenthe doc script is disabled.

------------------------------------------------------------------------------
*'pymode_doc_key'*
Expand All@@ -183,7 +183,7 @@ Set key for run python code.
Values: 0 or 1.
Default: 1.

If this option is set to 0 then pylint script is disabled.
If this option is set to 0 thenthepylint script is disabled.

------------------------------------------------------------------------------
*'pymode_lint_checker'*
Expand All@@ -192,11 +192,11 @@ Values: "pylint", "pyflakes", "pep8", "mccabe"

Default: "pyflakes,pep8,mccabe".

This optionset code checkers.
This optionsets code checkers.

------------------------------------------------------------------------------
*'pymode_lint_ignore'*
Values: IDs of errors, separated by commas or emptystring
Values: IDs of errors, separated by commas or emptystrings
E.g. "E501,W002", "E2,W" (Skip all Warnings and Errors startswith E2) and etc ~

Default: "E501".
Expand All@@ -206,7 +206,7 @@ See also: |'pymode_lint_select'|, |'pymode_lint_config'|

------------------------------------------------------------------------------
*'pymode_lint_select'*
Values: IDs of errors, separated by commas or emptystring
Values: IDs of errors, separated by commas or emptystrings
E.g. "W002,C" Force W002 and all C-ids ~

Default: "".
Expand All@@ -219,15 +219,15 @@ See also: |'pymode_lint_ignore'|, |'pymode_lint_config'|
Values: 0 or 1
Default: 0

This optionenabled "on the fly" code checking
This optionenables "on the fly" code checking

------------------------------------------------------------------------------
*'pymode_lint_config'*
Values: 'Path to pylint configuration file'
Default: "$HOME/.pylintrc"

If thisoptionis set path to pylint configuration. Ifconfiguration not found
usesfile 'pylintrc' from python-mode sources.
Thisoptionsets the path tothepylint configuration file. Ifthe
fileis not found, use the'pylintrc' file from python-mode sources.

See also: |'pymode_lint_ignore'|, |'pymode_lint_select'|

Expand All@@ -236,91 +236,92 @@ See also: |'pymode_lint_ignore'|, |'pymode_lint_select'|
Values: 0 or 1.
Default: 1.

If this option is set to 0 then pylint auto check every save is disabled.
If this option is set to 0, then pylint auto-checking on every save is
disabled.

------------------------------------------------------------------------------
*'pymode_lint_cwindow'*
Values: 0 or 1.
Default: 1.

If this option is set to 0 then pylint not show cwindow.
If this option is set to 0 then pylintwillnot show cwindow.

------------------------------------------------------------------------------
*'pymode_lint_message'*
Values: 0 or 1.
Default: 1.

If this option is set to 0 then pylint not show errorsin bottom
If this option is set to 0 then pylintwillnot show errorsat bottom.

------------------------------------------------------------------------------
*'pymode_lint_signs'*
Values: 0 or 1.
Default: 1.

If this option is set to 0 then pylint not place error signs.
If this option is set to 0 then pylintwillnot place error signs.

------------------------------------------------------------------------------
*'pymode_lint_jump'*
Values: 0 or 1.
Default: 0.

If this option is set to 0 then pylint not jumpon first error.
If this option is set to 0 then pylintwillnot jumpto the first error.

------------------------------------------------------------------------------
*'pymode_lint_hold'*
Values: 0 or 1.
Default: 0.

If this option is set to 0 then pylint switch on quickfix window when it open
Not working when |'pymode_lint_jump'| enabled.
If this option is set to 0 then pylintwillswitch onthequickfix window when
it opens. Doesn't work when |'pymode_lint_jump'| enabled.

------------------------------------------------------------------------------
*'pymode_lint_minheight'*
Values: int
Default: 3.

Set minimal height for pylint cwindow
Set minimal height forthepylint cwindow.

------------------------------------------------------------------------------
*'pymode_lint_mccabe_complexity'*
Values: int
Default: 8.

Set minimal complexity for mccabe linter.
Set minimal complexity forthemccabe linter.

------------------------------------------------------------------------------
*'pymode_lint_maxheight'*
Values: int
Default: 6.

Set maximal height for pylint cwindow
Set maximal height forthepylint cwindow.

------------------------------------------------------------------------------
*'pymode_rope'*
Values: 0 or 1.
Default: 1.

If this option is set to 0 then rope script is disabled.
If this option is set to 0 thentherope script is disabled.

------------------------------------------------------------------------------
*'pymode_breakpoint'*
Values: 0 or 1.
Default: 1.

If this option is set to 0 then breakpoint script is disabled.
If this option is set to 0 thenthebreakpoint script is disabled.

------------------------------------------------------------------------------
*'pymode_breakpoint_key'*
Default: '<leader>b'.

Key forset/unset breakpoint
Key forsetting/unsetting breakpoints.

------------------------------------------------------------------------------
*'pymode_utils'*
Values: 0 or 1.
Default: 1.

If this option is set to 0 then utils script is disabled.
If this option is set to 0thethen utils script is disabled.

------------------------------------------------------------------------------
*'pymode_virtualenv'*
Expand All@@ -334,7 +335,7 @@ If this option is set to 0 then virtualenv support is disabled.
Values: 0 or 1.
Default: 1.

Autoremove unused whitespaces
Auto-remove unused whitespaces.

------------------------------------------------------------------------------
*'pymode_syntax'*
Expand All@@ -349,7 +350,8 @@ not be used.
Values: 0 or 1.
Default: 1.

If this option is set to 1, pymode enable next options for python buffers: >
If this option is set to 1, pymode will enable the following options for python
buffers: >

setlocal cinwords=if,elif,else,for,while,try,except,finally,def,class
setlocal cindent
Expand All@@ -367,14 +369,15 @@ If this option is set to 1, pymode enable next options for python buffers: >
Values: 0 or 1.
Default: 1.

If this option is set to 1, pymode enable python-folding.
If this option is set to 1, pymodewillenable python-folding.

------------------------------------------------------------------------------
*'pymode_options_other'*
Values: 0 or 1.
Default: 1.

If this option is set to 1, pymode enable next options for python buffers: >
If this option is set to 1, pymode will enable the following options for python
buffers: >

setlocal complete+=t
setlocal formatoptions-=t
Expand All@@ -387,16 +390,16 @@ If this option is set to 1, pymode enable next options for python buffers: >
Values: 0 or 1.
Default: 1.

If this option is set to 1, pymode enable some python motions. Pymode-motion
is beta.
If this option is set to 1, pymodewillenable some python motions.
Pymode-motionis beta.

================ ============================
Key Command
================ ============================
[[ Jumpon previous class or function (normal, visual, operator modes)
]] Jumpon next class or function (normal, visual, operator modes)
[M Jumpon previous class or method (normal, visual, operator modes)
]M Jumpon next class or method (normal, visual, operator modes)
[[ Jumpto previous class or function (normal, visual, operator modes)
]] Jumpto next class or function (normal, visual, operator modes)
[M Jumpto previous class or method (normal, visual, operator modes)
]M Jumpto next class or method (normal, visual, operator modes)
aC Select a class. Ex: vaC, daC, yaC, caC (normal, operator modes)
iC Select inner class. Ex: viC, diC, yiC, ciC (normal, operator modes)
aM Select a function or method. Ex: vaM, daM, yaM, caM (normal, operator modes)
Expand All@@ -408,7 +411,7 @@ iM Select inner function or method. Ex: viM, diM, yiM, ciM (norma
3. Default Keys ~
*PythonModeKeys*

For redefine keys see: |PythonModeOptions|
To redefine keys, see: |PythonModeOptions|

================ ============================
Key Command
Expand All@@ -417,10 +420,10 @@ K Show python docs for current word under cursor
C-Space Rope code assist
<leader>r Run current buffer
<leader>b Set breakpoints
[[ Jumpon previous class or function (normal, visual, operator modes)
]] Jumpon next class or function (normal, visual, operator modes)
[M Jumpon previous class or method (normal, visual, operator modes)
]M Jumpon next class or method (normal, visual, operator modes)
[[ Jumpto previous class or function (normal, visual, operator modes)
]] Jumpto next class or function (normal, visual, operator modes)
[M Jumpto previous class or method (normal, visual, operator modes)
]M Jumpto next class or method (normal, visual, operator modes)
aC C Operation with a class.
Ex: vaC, daC, dC, yaC, yC, caC, cC (normal, operator modes)
iC Operation with inner class.
Expand DownExpand Up@@ -449,7 +452,7 @@ iM Operation with inner function or method.
Check current buffer

*:PyLintAuto* *PyLintAuto*
Automatic fix PEP8 errors in current buffer
Automatically fix PEP8 errors in the current buffer

*:Pyrun* *Pyrun*
Run current buffer
Expand All@@ -459,36 +462,45 @@ iM Operation with inner function or method.
5. FAQ ~
*PythonModeFAQ*

Python-modedont work
---------------------
Python-modedoesn't work
------------------------

Run ":call pymode#troubleshooting#Test()", fix warning or send me output.
Run ":call pymode#troubleshooting#Test()" and fix the warning or send me the
output.


Rope completion is very slow
----------------------------

To work rope_ creates a service directory: `.ropeproject`.
If |'pymode_rope_guess_project'| set on (by default) and `.ropeproject` in current dir not found, rope scan `.ropeproject` on every dir in parent path.
If rope finded `.ropeproject` in parent dirs, rope set project for all child dir and scan may be slow for many dirs and files.
To work, rope_ creates a service directory: `.ropeproject`. If
|'pymode_rope_guess_project'| is set on (as it is by default) and
`.ropeproject` is not found in the current dir, rope will scan for
`.ropeproject` in every dir in the parent path. If rope finds `.ropeproject`
in parent dirs, rope sets project for all child dir and the scan may be slow
for many dirs and files.

Solutions:

- Disable |'pymode_rope_guess_project'| to make rope always create `.ropeproject` in current dir.
- Delete `.ropeproject` from dip parent dir to make rope create `.ropeproject` in current dir.
- Press `<C-x>po` or `:RopeOpenProject` to make force rope create `.ropeproject` in current dir.

- Disable |'pymode_rope_guess_project'| to make rope always create
`.ropeproject` in the current dir.
- Delete `.ropeproject` from the parent dir to make rope create `.ropeproject`
in the current dir.
- Press `<C-x>po` or `:RopeOpenProject` to force rope to create `.ropeproject`
in the current dir.


Pylint check is very slow
-------------------------

In some projects pylint_ may check slowly, because it also scan imported modules if possible.
Tryuse pyflakes, see |'pymode_lint_checker'|.
In some projects pylint_ may check slowly, because it also scan imported
modules if possible.Tryusing pyflakes: see |'pymode_lint_checker'|.

You may set |exrc| and |secure| in your |vimrc| for auto set custom settings from `.vimrc` from your projects directories.
You may set |exrc| and |secure| in your |vimrc| to auto-set custom settings
from `.vimrc` from your projects directories.
>
Example: On Flask projects I automatically set 'g:pymode_lint_checker = "pyflakes"', on Django 'g:pymode_lint_checker = "pylint"'
Example: On Flask projects I automatically set
'g:pymode_lint_checker = "pyflakes"'.
On Django 'g:pymode_lint_checker = "pylint"'
<


Expand DownExpand Up@@ -528,14 +540,14 @@ You may set |exrc| and |secure| in your |vimrc| for auto set custom settings fro
7. License ~
*PythonModeLicense*

ThePython-mode is released under the GNU lesser general public license.
Python-mode is released under the GNU lesser general public license.
See: http://www.gnu.org/copyleft/lesser.html

If you like this plugin, you can send me postcard :)
My address is here: "Russia, 143401, Krasnogorsk, Shkolnaya 1-19" to "Kirill Klenov".
Thanks for support!
If you like this plugin, you can send meapostcard :)
My address is: "Russia, 143401, Krasnogorsk, Shkolnaya 1-19" to "Kirill Klenov".
Thanks foryoursupport!

Version 0.6.5: I still haven't received anypostcard, guys :(
Version 0.6.5: I still haven't received anypostcards, guys :(


------------------------------------------------------------------------------
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp