Skip to content

Commit 6eeb76d

Browse files
committed
Add pymode option to change preview height
1 parent 34c3d14 commit 6eeb76d

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

autoload/pymode.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ endfunction "}}}
6262
" DESC: Open temp buffer.
6363
fun! pymode#tempbuffer_open(name) "{{{
6464
pclose
65-
exe "botright 8new " . a:name
65+
exe "botright " . g:pymode_preview_height . "new " . a:name
6666
setlocal buftype=nofile bufhidden=delete noswapfile nowrap previewwindow
6767
redraw
6868
endfunction "}}}

autoload/pymode/doc.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ fun! pymode#doc#show(word) "{{{
3434
endif
3535

3636
normal gg
37-
execute 'resize ' . &previewheight
3837

3938
wincmd p
4039

autoload/pymode/rope.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ fun! pymode#rope#show_doc()
7878
setlocal filetype=rst
7979

8080
normal gg
81-
execute 'resize ' . &previewheight
8281

8382
wincmd p
8483
endif

doc/pymode.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ Setup pymode |quickfix| window.
131131
let g:pymode_quickfix_minheight = 3
132132
let g:pymode_quickfix_maxheight = 6
133133
134+
Set pymode |preview| window height. *'g:pymode_preview_height'*
135+
Preview window is used to show documentation and ouput from |pymode-run|.
136+
>
137+
let g:pymode_preview_height = &previewheight
138+
134139
-------------------------------------------------------------------------------
135140
2.1. Python version ~
136141
*pymode-python-version*

plugin/pymode.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ call pymode#default('g:pymode_quickfix_maxheight', 6)
6868
" Maximal height of pymode quickfix window
6969
call pymode#default('g:pymode_quickfix_minheight', 3)
7070

71+
" Height of preview window
72+
call pymode#default('g:pymode_preview_height', &previewheight)
73+
7174
" LOAD VIRTUALENV {{{
7275
"
7376
" Enable virtualenv support

0 commit comments

Comments
 (0)