Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit757c08d

Browse files
committed
Add debug configuration
1 parent550f55c commit757c08d

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

‎README.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,16 @@ Then rebuild **helptags** in vim::
9898
Troubleshooting
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

105112
And fix any warnings or copy the output and send it to me. (For example, by
106113
creating a `new github issue<https://github.com/klen/python-mode/issues/new>`_

‎autoload/pymode.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,17 @@ endfunction "}}}
106106

107107
fun!pymode#buffer_pre_write()"{{{
108108
letb:pymode_modified= &modified
109-
ifg:pymode_lint_unmodified|| (g:pymode_lint_on_write&&b:pymode_modified)
110-
callpymode#debug('check code')
111-
callpymode#lint#check()
112-
endif
113109
endfunction
114110

115111
fun!pymode#buffer_post_write()"{{{
116112
ifb:pymode_modified&&g:pymode_rope_regenerate_on_write
117113
callpymode#debug('regenerate')
118114
callpymode#rope#regenerate()
119115
endif
116+
ifg:pymode_lint_unmodified|| (g:pymode_lint_on_write&&b:pymode_modified)
117+
callpymode#debug('check code')
118+
callpymode#lint#check()
119+
endif
120120
endfunction"}}}
121121

122122
fun!pymode#debug(msg)"{{{

‎debug.vim

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
setrtp-=$HOME/.vim
11+
setrtp-=$HOME/.vim/after
12+
setnocp
13+
syntaxenable

‎plugin/pymode.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ if !g:pymode || &cp
1313
finish
1414
endif
1515

16+
" Pymode needs
17+
filetypepluginon
18+
1619
" OPTIONS: {{{
1720

1821
" Vim Python interpreter. Set to 'disable' for remove python features.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp