Skip to content

Commit b20a234

Browse files
committed
Add option to change where preview window appear
1 parent 6eeb76d commit b20a234

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

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 " . g:pymode_preview_height . "new " . a:name
65+
exe g:pymode_preview_position . " " . g:pymode_preview_height . "new " . a:name
6666
setlocal buftype=nofile bufhidden=delete noswapfile nowrap previewwindow
6767
redraw
6868
endfunction "}}}

doc/pymode.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,13 @@ Preview window is used to show documentation and ouput from |pymode-run|.
136136
>
137137
let g:pymode_preview_height = &previewheight
138138
139+
Set where pymode |preview| window will appear. *'g:pymode_preview_position'*
140+
>
141+
let g:pymode_preview_position = 'botright'
142+
143+
Value is command which can influcece where new window created by `:new` command
144+
will appear, eg. `:botright`.
145+
139146
-------------------------------------------------------------------------------
140147
2.1. Python version ~
141148
*pymode-python-version*

plugin/pymode.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ call pymode#default('g:pymode_quickfix_minheight', 3)
7171
" Height of preview window
7272
call pymode#default('g:pymode_preview_height', &previewheight)
7373

74+
" Position of preview window
75+
call pymode#default('g:pymode_preview_position', 'botright')
76+
7477
" LOAD VIRTUALENV {{{
7578
"
7679
" Enable virtualenv support

0 commit comments

Comments
 (0)