Skip to content

Commit 9b61eab

Browse files
committed
updated pymode documentation
1 parent 109215e commit 9b61eab

File tree

1 file changed

+38
-10
lines changed

1 file changed

+38
-10
lines changed

doc/pymode.txt

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*pymode.txt* For Vim Version 8.0 Last change: 2017 November 11
1+
*pymode.txt* For Vim Version 8.0 Last change: 2017 November 20
22

33
____ _ _ ____ _ _ _____ _ _ __ __ _____ ____ ____ ~
44
( _ \( \/ )(_ _)( )_( )( _ )( \( )___( \/ )( _ )( _ \( ___) ~
@@ -688,8 +688,8 @@ Highlight docstrings as pythonDocstring (otherwise as pythonString)
688688
6. FAQ ~
689689
*pymode-faq*
690690

691-
Python-mode doesn't work
692-
------------------------
691+
1. Python-mode doesn't work
692+
---------------------------
693693

694694
Start python mode with:
695695
`vim -i NONE -u <path_to_pymode>/debugvimrc.vim`
@@ -703,8 +703,8 @@ plugin seems broken.
703703
*Underlined submitting!
704704

705705

706-
Rope completion is very slow *pymode-rope-slow*
707-
----------------------------
706+
2. Rope completion is very slow *pymode-rope-slow*
707+
-------------------------------
708708

709709
Rope creates a project-level service directory in |.ropeproject|
710710

@@ -726,8 +726,8 @@ You may also set |'g:pymode_rope_project_root'| to manually specify the project
726726
root path.
727727

728728

729-
Pylint check is very slow
730-
-------------------------
729+
3. Pylint check is very slow
730+
----------------------------
731731

732732
In some projects pylint may check slowly, because it also scans imported
733733
modules if possible. Try using another code checker: see
@@ -736,8 +736,8 @@ modules if possible. Try using another code checker: see
736736
You may set |exrc| and |secure| in your |vimrc| to auto-set custom settings
737737
from `.vimrc` from your projects directories.
738738

739-
OSX cannot import urandom
740-
-------------------------
739+
4. OSX cannot import urandom
740+
----------------------------
741741

742742
See: https://groups.google.com/forum/?fromgroups=#!topic/vim_dev/2NXKF6kDONo
743743

@@ -749,7 +749,25 @@ The sequence of commands that fixed this:
749749
brew install -v --force macvim
750750
brew link macvim
751751
brew link python
752-
<
752+
753+
5. Folding is slow
754+
------------------
755+
756+
Python mode adds folding for definitions and multi line docstrings. These may
757+
be costly to compute on large files. To disable them one simple has to to add:
758+
759+
let g:pymode_folding = 1
760+
761+
to their vimrc file.
762+
763+
Beware that when editing python files in multiple windows vim computes the
764+
folding for every typed character. Thus it may be useful to define:
765+
766+
augroup unset_folding_in_insert_mode
767+
autocmd!
768+
autocmd InsertEnter *.py setlocal foldmethod=marker
769+
autocmd InsertLeave *.py setlocal foldmethod=expr
770+
augroup END
753771

754772
===============================================================================
755773
7. Development~
@@ -764,6 +782,16 @@ documentation (except as a first word in a sentence in which case is
764782
3. All defined functions should use vim's conventions and start with 'Pymode'.
765783
4. Special marks for project development are `XXX` and `TODO`. They provide a
766784
easy way for developers to check pending issues.
785+
5. If submitting a pull request then a test should be added which smartly
786+
covers the found bug/new feature. Check out the `tests/test.sh` (1) file and
787+
other executed files.
788+
A suggested structure is the following: add your test to
789+
`tests/test_bash` (2) and a vim script to be sourced at
790+
`tests/test_procedures_vimscript` (3). Try to make use of the already existing
791+
files at `tests/test_python_sample_code` (4). File (1) should be trigger the
792+
newly added file (2). This latter file should invoke vim which in turn sources
793+
file (3). File (3) may then read (4) as a first part of its assertion
794+
structure and then execute the remaning of the instructions/assertions.
767795

768796
===============================================================================
769797
8. Credits ~

0 commit comments

Comments
 (0)