@@ -25,12 +25,12 @@ CONTENTS *Python-mode-contents*
25
25
1. Intro~
26
26
*PythonMode*
27
27
28
- Python-mode is a vim plugin that allows you to use the pylint, rope, pydoc
29
- library in vim to provide features like python codelooking for bugs ,
30
- refactoring and some other useful things.
28
+ Python-mode is a vim plugin that allows you to use the pylint, rope,and pydoc
29
+ libraries in vim to provide features like python codebug checking ,
30
+ refactoring, and some other useful things.
31
31
32
32
This plugin allow you create python code in vim very easily. There is no need
33
- to install the pylint or ropelibrary on your system.
33
+ to install the pylint or ropelibraries on your system.
34
34
35
35
36
36
==============================================================================
@@ -41,7 +41,7 @@ to install the pylint or rope library on your system.
41
41
Pylint options (ex. disable messages) may be defined in '$HOME/pylint.rc'
42
42
See pylint documentation.
43
43
44
- The script provides the following options that can customise the behaviourthe
44
+ This script provides the following options that can customise the behaviourof
45
45
PythonMode. These options should be set in your vimrc.
46
46
47
47
| 'pymode_paths' | Additional python paths for pymode
@@ -74,7 +74,7 @@ PythonMode. These options should be set in your vimrc.
74
74
75
75
| 'pymode_lint_signs' | Place signs
76
76
77
- | 'pymode_lint_jump' | Auto jumpon first error
77
+ | 'pymode_lint_jump' | Auto jumpto first error
78
78
79
79
| 'pymode_lint_hold' | Hold cursor in current window
80
80
@@ -116,7 +116,7 @@ PythonMode. These options should be set in your vimrc.
116
116
2.1. Customisation details~
117
117
*PythonModeOptionsDetails*
118
118
119
- To enable any of thebelow options you should put the given line in your
119
+ To enable any of the options below you should put the given line in your
120
120
'$HOME/.vimrc'. See| vimrc-intro | .
121
121
122
122
------------------------------------------------------------------------------
@@ -157,7 +157,7 @@ This option set additional python import paths
157
157
Values: 0 or 1.
158
158
Default: 1.
159
159
160
- If this option is set to 0 thendocs script is disabled.
160
+ If this option is set to 0 thenthe doc script is disabled.
161
161
162
162
------------------------------------------------------------------------------
163
163
*'pymode_doc_key'*
@@ -183,7 +183,7 @@ Set key for run python code.
183
183
Values: 0 or 1.
184
184
Default: 1.
185
185
186
- If this option is set to 0 then pylint script is disabled.
186
+ If this option is set to 0 thenthe pylint script is disabled.
187
187
188
188
------------------------------------------------------------------------------
189
189
*'pymode_lint_checker'*
@@ -192,11 +192,11 @@ Values: "pylint", "pyflakes", "pep8", "mccabe"
192
192
193
193
Default: "pyflakes,pep8,mccabe".
194
194
195
- This optionset code checkers.
195
+ This optionsets code checkers.
196
196
197
197
------------------------------------------------------------------------------
198
198
*'pymode_lint_ignore'*
199
- Values: IDs of errors, separated by commas or emptystring
199
+ Values: IDs of errors, separated by commas or emptystrings
200
200
E.g. "E501,W002", "E2,W" (Skip all Warnings and Errors startswith E2) and etc~
201
201
202
202
Default: "E501".
@@ -206,7 +206,7 @@ See also: |'pymode_lint_select'|, |'pymode_lint_config'|
206
206
207
207
------------------------------------------------------------------------------
208
208
*'pymode_lint_select'*
209
- Values: IDs of errors, separated by commas or emptystring
209
+ Values: IDs of errors, separated by commas or emptystrings
210
210
E.g. "W002,C" Force W002 and all C-ids~
211
211
212
212
Default: "".
@@ -219,15 +219,15 @@ See also: |'pymode_lint_ignore'|, |'pymode_lint_config'|
219
219
Values: 0 or 1
220
220
Default: 0
221
221
222
- This optionenabled "on the fly" code checking
222
+ This optionenables "on the fly" code checking
223
223
224
224
------------------------------------------------------------------------------
225
225
*'pymode_lint_config'*
226
226
Values: 'Path to pylint configuration file'
227
227
Default: "$HOME/.pylintrc"
228
228
229
- If this optionis set path to pylint configuration. Ifconfiguration not found
230
- uses file'pylintrc' from python-mode sources.
229
+ This optionsets the path tothe pylint configuration file . Ifthe
230
+ fileis not found, use the 'pylintrc' file from python-mode sources.
231
231
232
232
See also:| 'pymode_lint_ignore' | ,| 'pymode_lint_select' |
233
233
@@ -236,91 +236,92 @@ See also: |'pymode_lint_ignore'|, |'pymode_lint_select'|
236
236
Values: 0 or 1.
237
237
Default: 1.
238
238
239
- If this option is set to 0 then pylint auto check every save is disabled.
239
+ If this option is set to 0, then pylint auto-checking on every save is
240
+ disabled.
240
241
241
242
------------------------------------------------------------------------------
242
243
*'pymode_lint_cwindow'*
243
244
Values: 0 or 1.
244
245
Default: 1.
245
246
246
- If this option is set to 0 then pylint not show cwindow.
247
+ If this option is set to 0 then pylintwill not show cwindow.
247
248
248
249
------------------------------------------------------------------------------
249
250
*'pymode_lint_message'*
250
251
Values: 0 or 1.
251
252
Default: 1.
252
253
253
- If this option is set to 0 then pylint not show errorsin bottom
254
+ If this option is set to 0 then pylintwill not show errorsat bottom.
254
255
255
256
------------------------------------------------------------------------------
256
257
*'pymode_lint_signs'*
257
258
Values: 0 or 1.
258
259
Default: 1.
259
260
260
- If this option is set to 0 then pylint not place error signs.
261
+ If this option is set to 0 then pylintwill not place error signs.
261
262
262
263
------------------------------------------------------------------------------
263
264
*'pymode_lint_jump'*
264
265
Values: 0 or 1.
265
266
Default: 0.
266
267
267
- If this option is set to 0 then pylint not jumpon first error.
268
+ If this option is set to 0 then pylintwill not jumpto the first error.
268
269
269
270
------------------------------------------------------------------------------
270
271
*'pymode_lint_hold'*
271
272
Values: 0 or 1.
272
273
Default: 0.
273
274
274
- If this option is set to 0 then pylint switch on quickfix window when it open
275
- Not working when| 'pymode_lint_jump' | enabled.
275
+ If this option is set to 0 then pylintwill switch onthe quickfix window when
276
+ it opens. Doesn't work when| 'pymode_lint_jump' | enabled.
276
277
277
278
------------------------------------------------------------------------------
278
279
*'pymode_lint_minheight'*
279
280
Values: int
280
281
Default: 3.
281
282
282
- Set minimal height for pylint cwindow
283
+ Set minimal height forthe pylint cwindow.
283
284
284
285
------------------------------------------------------------------------------
285
286
*'pymode_lint_mccabe_complexity'*
286
287
Values: int
287
288
Default: 8.
288
289
289
- Set minimal complexity for mccabe linter.
290
+ Set minimal complexity forthe mccabe linter.
290
291
291
292
------------------------------------------------------------------------------
292
293
*'pymode_lint_maxheight'*
293
294
Values: int
294
295
Default: 6.
295
296
296
- Set maximal height for pylint cwindow
297
+ Set maximal height forthe pylint cwindow.
297
298
298
299
------------------------------------------------------------------------------
299
300
*'pymode_rope'*
300
301
Values: 0 or 1.
301
302
Default: 1.
302
303
303
- If this option is set to 0 then rope script is disabled.
304
+ If this option is set to 0 thenthe rope script is disabled.
304
305
305
306
------------------------------------------------------------------------------
306
307
*'pymode_breakpoint'*
307
308
Values: 0 or 1.
308
309
Default: 1.
309
310
310
- If this option is set to 0 then breakpoint script is disabled.
311
+ If this option is set to 0 thenthe breakpoint script is disabled.
311
312
312
313
------------------------------------------------------------------------------
313
314
*'pymode_breakpoint_key'*
314
315
Default: '<leader> b'.
315
316
316
- Key forset/unset breakpoint
317
+ Key forsetting/unsetting breakpoints.
317
318
318
319
------------------------------------------------------------------------------
319
320
*'pymode_utils'*
320
321
Values: 0 or 1.
321
322
Default: 1.
322
323
323
- If this option is set to 0 then utils script is disabled.
324
+ If this option is set to 0the then utils script is disabled.
324
325
325
326
------------------------------------------------------------------------------
326
327
*'pymode_virtualenv'*
@@ -334,7 +335,7 @@ If this option is set to 0 then virtualenv support is disabled.
334
335
Values: 0 or 1.
335
336
Default: 1.
336
337
337
- Autoremove unused whitespaces
338
+ Auto-remove unused whitespaces.
338
339
339
340
------------------------------------------------------------------------------
340
341
*'pymode_syntax'*
@@ -349,7 +350,8 @@ not be used.
349
350
Values: 0 or 1.
350
351
Default: 1.
351
352
352
- If this option is set to 1, pymode enable next options for python buffers:>
353
+ If this option is set to 1, pymode will enable the following options for python
354
+ buffers:>
353
355
354
356
setlocal cinwords=if,elif,else,for,while,try,except,finally,def,class
355
357
setlocal cindent
@@ -367,14 +369,15 @@ If this option is set to 1, pymode enable next options for python buffers: >
367
369
Values: 0 or 1.
368
370
Default: 1.
369
371
370
- If this option is set to 1, pymode enable python-folding.
372
+ If this option is set to 1, pymodewill enable python-folding.
371
373
372
374
------------------------------------------------------------------------------
373
375
*'pymode_options_other'*
374
376
Values: 0 or 1.
375
377
Default: 1.
376
378
377
- If this option is set to 1, pymode enable next options for python buffers:>
379
+ If this option is set to 1, pymode will enable the following options for python
380
+ buffers:>
378
381
379
382
setlocal complete+=t
380
383
setlocal formatoptions-=t
@@ -387,16 +390,16 @@ If this option is set to 1, pymode enable next options for python buffers: >
387
390
Values: 0 or 1.
388
391
Default: 1.
389
392
390
- If this option is set to 1, pymode enable some python motions. Pymode-motion
391
- is beta.
393
+ If this option is set to 1, pymodewill enable some python motions.
394
+ Pymode-motion is beta.
392
395
393
396
================ ============================
394
397
Key Command
395
398
================ ============================
396
- [[ Jumpon previous class or function (normal, visual, operator modes)
397
- ]] Jumpon next class or function (normal, visual, operator modes)
398
- [M Jumpon previous class or method (normal, visual, operator modes)
399
- ]M Jumpon next class or method (normal, visual, operator modes)
399
+ [[ Jumpto previous class or function (normal, visual, operator modes)
400
+ ]] Jumpto next class or function (normal, visual, operator modes)
401
+ [M Jumpto previous class or method (normal, visual, operator modes)
402
+ ]M Jumpto next class or method (normal, visual, operator modes)
400
403
aC Select a class. Ex: vaC, daC, yaC, caC (normal, operator modes)
401
404
iC Select inner class. Ex: viC, diC, yiC, ciC (normal, operator modes)
402
405
aM Select a function or method. Ex: vaM, daM, yaM, caM (normal, operator modes)
@@ -408,7 +411,7 @@ iM Select inner function or method. Ex: viM, diM, yiM, ciM (norma
408
411
3. Default Keys~
409
412
*PythonModeKeys*
410
413
411
- For redefine keys see:| PythonModeOptions |
414
+ To redefine keys, see:| PythonModeOptions |
412
415
413
416
================ ============================
414
417
Key Command
@@ -417,10 +420,10 @@ K Show python docs for current word under cursor
417
420
C-Space Rope code assist
418
421
<leader> r Run current buffer
419
422
<leader> b Set breakpoints
420
- [[ Jumpon previous class or function (normal, visual, operator modes)
421
- ]] Jumpon next class or function (normal, visual, operator modes)
422
- [M Jumpon previous class or method (normal, visual, operator modes)
423
- ]M Jumpon next class or method (normal, visual, operator modes)
423
+ [[ Jumpto previous class or function (normal, visual, operator modes)
424
+ ]] Jumpto next class or function (normal, visual, operator modes)
425
+ [M Jumpto previous class or method (normal, visual, operator modes)
426
+ ]M Jumpto next class or method (normal, visual, operator modes)
424
427
aC C Operation with a class.
425
428
Ex: vaC, daC, dC, yaC, yC, caC, cC (normal, operator modes)
426
429
iC Operation with inner class.
@@ -449,7 +452,7 @@ iM Operation with inner function or method.
449
452
Check current buffer
450
453
451
454
*:PyLintAuto* *PyLintAuto*
452
- Automatic fix PEP8 errors in current buffer
455
+ Automatically fix PEP8 errors in the current buffer
453
456
454
457
*:Pyrun* *Pyrun*
455
458
Run current buffer
@@ -459,36 +462,45 @@ iM Operation with inner function or method.
459
462
5. FAQ~
460
463
*PythonModeFAQ*
461
464
462
- Python-modedont work
463
- ---------------------
465
+ Python-modedoesn't work
466
+ ------------------------
464
467
465
- Run ":call pymode#troubleshooting#Test()", fix warning or send me output.
468
+ Run ":call pymode#troubleshooting#Test()" and fix the warning or send me the
469
+ output.
466
470
467
471
468
472
Rope completion is very slow
469
473
----------------------------
470
474
471
- To work rope_ creates a service directory:`.ropeproject` .
472
- 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.
473
- If rope finded`.ropeproject` in parent dirs, rope set project for all child dir and scan may be slow for many dirs and files.
475
+ To work, rope_ creates a service directory:`.ropeproject` . If
476
+ | 'pymode_rope_guess_project' | is set on (as it is by default) and
477
+ `.ropeproject` is not found in the current dir, rope will scan for
478
+ `.ropeproject` in every dir in the parent path. If rope finds`.ropeproject`
479
+ in parent dirs, rope sets project for all child dir and the scan may be slow
480
+ for many dirs and files.
474
481
475
482
Solutions:
476
483
477
- - Disable| 'pymode_rope_guess_project' | to make rope always create`.ropeproject` in current dir.
478
- - Delete`.ropeproject` from dip parent dir to make rope create`.ropeproject` in current dir.
479
- - Press`<C-x> po ` or`:RopeOpenProject` to make force rope create`.ropeproject` in current dir.
480
-
484
+ - Disable| 'pymode_rope_guess_project' | to make rope always create
485
+ `.ropeproject` in the current dir.
486
+ - Delete`.ropeproject` from the parent dir to make rope create`.ropeproject`
487
+ in the current dir.
488
+ - Press`<C-x> po ` or`:RopeOpenProject` to force rope to create`.ropeproject`
489
+ in the current dir.
481
490
482
491
483
492
Pylint check is very slow
484
493
-------------------------
485
494
486
- In some projects pylint_ may check slowly, because it also scan imported modules if possible.
487
- Tryuse pyflakes, see| 'pymode_lint_checker' | .
495
+ In some projects pylint_ may check slowly, because it also scan imported
496
+ modules if possible. Tryusing pyflakes: see| 'pymode_lint_checker' | .
488
497
489
- You may set| exrc | and| secure | in your| vimrc | for auto set custom settings from`.vimrc` from your projects directories.
498
+ You may set| exrc | and| secure | in your| vimrc | to auto-set custom settings
499
+ from`.vimrc` from your projects directories.
490
500
>
491
- Example: On Flask projects I automatically set 'g:pymode_lint_checker = "pyflakes"', on Django 'g:pymode_lint_checker = "pylint"'
501
+ Example: On Flask projects I automatically set
502
+ 'g:pymode_lint_checker = "pyflakes"'.
503
+ On Django 'g:pymode_lint_checker = "pylint"'
492
504
<
493
505
494
506
@@ -528,14 +540,14 @@ You may set |exrc| and |secure| in your |vimrc| for auto set custom settings fro
528
540
7. License~
529
541
*PythonModeLicense*
530
542
531
- The Python-mode is released under the GNU lesser general public license.
543
+ Python-mode is released under the GNU lesser general public license.
532
544
See:http://www.gnu.org/copyleft/lesser.html
533
545
534
- If you like this plugin, you can send me postcard :)
535
- My address is here : "Russia, 143401, Krasnogorsk, Shkolnaya 1-19" to "Kirill Klenov".
536
- Thanks for support!
546
+ If you like this plugin, you can send mea postcard :)
547
+ My address is: "Russia, 143401, Krasnogorsk, Shkolnaya 1-19" to "Kirill Klenov".
548
+ Thanks foryour support!
537
549
538
- Version 0.6.5: I still haven't received anypostcard , guys :(
550
+ Version 0.6.5: I still haven't received anypostcards , guys :(
539
551
540
552
541
553
------------------------------------------------------------------------------