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::
9898Troubleshooting
9999===============
100100
101- If your python-mode doesn't work: open any python file and type: ::
101+ If your python-mode doesn't work:
102102
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 `
104111
105112And fix any warnings or copy the output and send it to me. (For example, by
106113creating 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 "}}}
106106
107107fun ! pymode#buffer_pre_write () " {{{
108108 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
113109endfunction
114110
115111fun ! pymode#buffer_post_write () " {{{
116112 if b: pymode_modified && g: pymode_rope_regenerate_on_write
117113 call pymode#debug (' regenerate' )
118114 call pymode#rope#regenerate ()
119115 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
120120endfunction " }}}
121121
122122fun ! 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
1313 finish
1414endif
1515
16+ " Pymode needs
17+ filetype plugin on
18+
1619" OPTIONS: {{{
1720
1821" Vim Python interpreter. Set to 'disable' for remove python features.
You can’t perform that action at this time.
0 commit comments