1
- *pymode.txt* For Vim Version 8.0 Last change:2017 November11
1
+ *pymode.txt* For Vim Version 8.0 Last change:2017 November20
2
2
3
3
____ _ _ ____ _ _ _____ _ _ __ __ _____ ____ ____~
4
4
( _ \( \/ )(_ _)( )_( )( _ )( \( )___( \/ )( _ )( _ \( ___)~
@@ -688,8 +688,8 @@ Highlight docstrings as pythonDocstring (otherwise as pythonString)
688
688
6. FAQ~
689
689
*pymode-faq*
690
690
691
- Python-mode doesn't work
692
- ------------------------
691
+ 1. Python-mode doesn't work
692
+ ---------------------------
693
693
694
694
Start python mode with:
695
695
`vim -i NONE -u<path_to_pymode> /debugvimrc.vim`
@@ -703,8 +703,8 @@ plugin seems broken.
703
703
*Underlinedsubmitting!
704
704
705
705
706
- Rope completion is very slow*pymode-rope-slow*
707
- ----------------------------
706
+ 2. Rope completion is very slow*pymode-rope-slow*
707
+ -------------------------------
708
708
709
709
Rope creates a project-level service directory in| .ropeproject |
710
710
@@ -726,8 +726,8 @@ You may also set |'g:pymode_rope_project_root'| to manually specify the project
726
726
root path.
727
727
728
728
729
- Pylint check is very slow
730
- -------------------------
729
+ 3. Pylint check is very slow
730
+ ----------------------------
731
731
732
732
In some projects pylint may check slowly, because it also scans imported
733
733
modules if possible. Try using another code checker: see
@@ -736,8 +736,8 @@ modules if possible. Try using another code checker: see
736
736
You may set| exrc | and| secure | in your| vimrc | to auto-set custom settings
737
737
from`.vimrc` from your projects directories.
738
738
739
- OSX cannot import urandom
740
- -------------------------
739
+ 4. OSX cannot import urandom
740
+ ----------------------------
741
741
742
742
See:https://groups.google.com/forum/?fromgroups=#!topic/vim_dev/2NXKF6kDONo
743
743
@@ -749,7 +749,25 @@ The sequence of commands that fixed this:
749
749
brew install -v --force macvim
750
750
brew link macvim
751
751
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
753
771
754
772
===============================================================================
755
773
7. Development~
@@ -764,6 +782,16 @@ documentation (except as a first word in a sentence in which case is
764
782
3. All defined functions should use vim's conventions and start with 'Pymode'.
765
783
4. Special marks for project development are`XXX ` and`TODO ` . They provide a
766
784
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.
767
795
768
796
===============================================================================
769
797
8. Credits~