File tree Expand file tree Collapse file tree 4 files changed +29
-6
lines changed Expand file tree Collapse file tree 4 files changed +29
-6
lines changed Original file line number Diff line number Diff line change @@ -98,9 +98,16 @@ Then rebuild **helptags** in vim::
98
98
Troubleshooting
99
99
===============
100
100
101
- If your python-mode doesn't work: open any python file and type: ::
101
+ If your python-mode doesn't work:
102
102
103
- :call pymode#troubleshooting#test()
103
+ 1. Load Vim with only python-mode enabled (use `debug.vim ` from pymode): ::
104
+
105
+ vim -u <path_to_pymode>/debug.vim
106
+
107
+ And try to repeat your case. If no error occurs, seems like problem isnt in the
108
+ plugin.
109
+
110
+ 2. Type `:PymodeTroubleshooting `
104
111
105
112
And fix any warnings or copy the output and send it to me. (For example, by
106
113
creating a `new github issue <https://github.com/klen/python-mode/issues/new >`_
Original file line number Diff line number Diff line change @@ -106,17 +106,17 @@ endfunction "}}}
106
106
107
107
fun ! pymode#buffer_pre_write () " {{{
108
108
let b: pymode_modified = &modified
109
- if g: pymode_lint_unmodified || (g: pymode_lint_on_write && b: pymode_modified )
110
- call pymode#debug (' check code' )
111
- call pymode#lint#check ()
112
- endif
113
109
endfunction
114
110
115
111
fun ! pymode#buffer_post_write () " {{{
116
112
if b: pymode_modified && g: pymode_rope_regenerate_on_write
117
113
call pymode#debug (' regenerate' )
118
114
call pymode#rope#regenerate ()
119
115
endif
116
+ if g: pymode_lint_unmodified || (g: pymode_lint_on_write && b: pymode_modified )
117
+ call pymode#debug (' check code' )
118
+ call pymode#lint#check ()
119
+ endif
120
120
endfunction " }}}
121
121
122
122
fun ! pymode#debug (msg) " {{{
Original file line number Diff line number Diff line change
1
+ " Use this settings for testing the plugin.
2
+ " Run vim with command
3
+ "
4
+ " $ vim -u debug.py
5
+ "
6
+ " Only python-mode will be loaded.
7
+
8
+
9
+ execute (' set rtp+=' . expand (' <sfile>:p:h' ))
10
+ set rtp -= $HOME /.vim
11
+ set rtp -= $HOME /.vim/ after
12
+ set nocp
13
+ syntax enable
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ if !g:pymode || &cp
13
13
finish
14
14
endif
15
15
16
+ " Pymode needs
17
+ filetype plugin on
18
+
16
19
" OPTIONS: {{{
17
20
18
21
" Vim Python interpreter. Set to 'disable' for remove python features.
You can’t perform that action at this time.
0 commit comments