Skip to content

Commit 8c3215d

Browse files
committed
Working on pymode.
1 parent 96d1233 commit 8c3215d

File tree

4 files changed

+22
-43
lines changed

4 files changed

+22
-43
lines changed

autoload/pymode/lint.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ fun! pymode#lint#check() "{{{
7979

8080
let b:pymode_error_line = -1
8181
call pymode#lint#show_errormessage()
82+
call pymode#wide_message('Found errors and warnings: ' . len(errors))
8283

8384
endfunction " }}}
8485

autoload/pymode/troubleshooting.vim

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,7 @@ EOF
8989
" call append('$', 'let pymode_lint_error_symbol = ' . string(g:pymode_lint_error_symbol))
9090
" call append('$', 'let pymode_lint_info_symbol = ' . string(g:pymode_lint_info_symbol))
9191
" call append('$', 'let pymode_lint_pyflakes_symbol = ' . string(g:pymode_lint_pyflakes_symbol))
92-
" call append('$', 'let pymode_lint_jump = ' . string(g:pymode_lint_jump))
9392
" call append('$', 'let pymode_lint_hold = ' . string(g:pymode_lint_hold))
94-
" call append('$', 'let pymode_lint_minheight = ' . string(g:pymode_lint_minheight))
95-
" call append('$', 'let pymode_lint_maxheight = ' . string(g:pymode_lint_maxheight))
9693
" endif
9794

9895
" call append('$', 'let pymode_rope = ' . string(g:pymode_rope))

ftplugin/python/pymode.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ endif
8888
if g:pymode_doc
8989

9090
" Set commands
91-
command! -buffer -nargs=1 PymodeDocumentation call pymode#doc#show("<args>")
91+
command! -buffer -nargs=1 PymodeDoc call pymode#doc#show("<args>")
9292

9393
" Set keys
9494
exe "nnoremap <silent> <buffer> " g:pymode_doc_bind ":call pymode#doc#show(expand('<cword>'))<CR>"

plugin/pymode.vim

Lines changed: 20 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
" vi: fdl=1
2-
let g:pymode_version = "0.6.19"
2+
let g:pymode_version = "0.7.0"
33

44
com! PymodeVersion echomsg "Current python-mode version: " . g:pymode_version
55
com! PymodeTroubleshooting call pymode#troubleshooting#test()
@@ -20,9 +20,6 @@ call pymode#default('g:pymode_python', 'python')
2020
" Disable pymode warnings
2121
call pymode#default('g:pymode_warning', 1)
2222

23-
" Modify sys.path for pymode modules loading
24-
call pymode#default('g:pymode_path', 1)
25-
2623
" Additional python paths
2724
call pymode#default('g:pymode_paths', [])
2825

@@ -45,6 +42,12 @@ call pymode#default("g:pymode_trim_whitespaces", 1)
4542
" Set recomended python options
4643
call pymode#default("g:pymode_options", 1)
4744

45+
" Minimal height of pymode quickfix window
46+
call pymode#default('g:pymode_quickfix_maxheight', 6)
47+
48+
" Maximal height of pymode quickfix window
49+
call pymode#default('g:pymode_quickfix_minheight', 3)
50+
4851
" LOAD VIRTUALENV {{{
4952
"
5053
" Enable virtualenv support
@@ -83,60 +86,34 @@ call pymode#default("g:pymode_lint_on_write", 1)
8386
" Check code on fly
8487
call pymode#default("g:pymode_lint_on_fly", 0)
8588

86-
" Show current line error message
87-
call pymode#default("g:pymode_lint_message", 1)
88-
89-
" Hold cursor on current window when quickfix open
90-
call pymode#default('g:pymode_lint_hold', 0)
91-
92-
" Minimal height of pymode quickfix window
93-
call pymode#default('g:pymode_lint_maxheight', 6)
94-
95-
" Maximal height of pymode quickfix window
96-
call pymode#default('g:pymode_lint_minheight', 3)
97-
9889
" Show message about error in command line
99-
call pymode#default("g:pymode_lint_status", 1)
90+
call pymode#default("g:pymode_lint_message", 1)
10091

10192
" Choices are: pylint, pyflakes, pep8, mccabe
102-
call pymode#default("g:pymode_lint_checkers", "pyflakes,pep8,mccabe")
93+
call pymode#default("g:pymode_lint_checkers", ['pyflakes', 'pep8', 'mccabe'])
10394

10495
" Skip errors and warnings (e.g. E4,W)
10596
call pymode#default("g:pymode_lint_ignore", "")
10697

107-
" Auto open cwindow if errors find
108-
call pymode#default("g:pymode_lint_cwindow", 1)
109-
11098
" Select errors and warnings (e.g. E4,W)
11199
call pymode#default("g:pymode_lint_select", "")
112100

101+
" Auto open cwindow if any errors has been finded
102+
call pymode#default("g:pymode_lint_cwindow", 1)
103+
113104
" Place error signs
114105
call pymode#default("g:pymode_lint_signs", 1)
115106

116-
" Always show the errors ruller, even if there's no errors.
117-
call pymode#default("g:pymode_lint_signs_always_visible", 0)
118-
119-
" Todo symbol.
107+
" Symbol's definitions
120108
call pymode#default("g:pymode_lint_todo_symbol", "WW")
121-
122-
" Comment symbol.
123109
call pymode#default("g:pymode_lint_comment_symbol", "CC")
124-
125-
" Visual symbol.
126110
call pymode#default("g:pymode_lint_visual_symbol", "RR")
127-
128-
" Error symbol.
129111
call pymode#default("g:pymode_lint_error_symbol", "EE")
130-
131-
" Info symbol.
132112
call pymode#default("g:pymode_lint_info_symbol", "II")
133-
134-
" PyFlakes' info symbol.
135113
call pymode#default("g:pymode_lint_pyflakes_symbol", "FF")
136114

137115
if g:pymode_lint_signs && has('signs')
138116

139-
" Signs definition
140117
execute 'sign define PymodeW text=' . g:pymode_lint_todo_symbol . " texthl=Todo"
141118
execute 'sign define PymodeC text=' . g:pymode_lint_comment_symbol . " texthl=Comment"
142119
execute 'sign define PymodeR text=' . g:pymode_lint_visual_symbol . " texthl=Visual"
@@ -158,7 +135,7 @@ call pymode#default('g:pymode_breakpoint', 1)
158135
call pymode#default('g:pymode_breakpoint_bind', '<leader>b')
159136

160137
" Default pattern for making breakpoints. Leave this empty for auto search available debuggers (pdb, ipdb, ...)
161-
call pymode#default('g:pymode_breakpoint_template', '')
138+
call pymode#default('g:pymode_breakpoint_cmd', '')
162139

163140
" }}}
164141

@@ -171,6 +148,7 @@ call pymode#default('g:pymode_rope', 1)
171148
call pymode#default('g:pymode_rope_completion', 1)
172149

173150
" Complete keywords from not imported modules (could make completion slower)
151+
" Enable autoimport used modules
174152
call pymode#default('g:pymode_rope_autoimport', 1)
175153

176154
" Autoimported modules
@@ -185,7 +163,7 @@ call pymode#default('g:pymode_rope_completion_bind', '<C-Space>')
185163
" Bind keys for goto definition (leave empty for disable)
186164
call pymode#default('g:pymode_rope_goto_definition_bind', '<C-c>g')
187165

188-
" set commend for open definition (e, new, vnew)
166+
" set command for open definition (e, new, vnew)
189167
call pymode#default('g:pymode_rope_goto_definition_cmd', 'new')
190168

191169
" Bind keys for show documentation (leave empty for disable)
@@ -222,6 +200,9 @@ call pymode#default('g:pymode_rope_move_bind', '<C-c>rv')
222200
" code to call it instead
223201
call pymode#default('g:pymode_rope_use_function_bind', '<C-c>ru')
224202

203+
" Regenerate project cache on every save
204+
call pymode#default('g:pymode_rope_regenerate_on_write', 1)
205+
225206
" }}}
226207

227208
" }}}
@@ -255,7 +236,7 @@ else
255236

256237
endif
257238

258-
com! PymodeVersion echomsg "Pymode version: " . g:pymode_version . " interpreter: " . g:pymode_python . " lint: " . g:pymode_lint . " rope: " . g:pymode_rope
239+
command! PymodeVersion echomsg "Pymode version: " . g:pymode_version . " interpreter: " . g:pymode_python . " lint: " . g:pymode_lint . " rope: " . g:pymode_rope
259240

260241
augroup pymode
261242

0 commit comments

Comments
 (0)