forked from VimPlug/jedi-vim
Merge pull request #363 from petobens/master
Add 'winwidth' split option
This commit is contained in:
@@ -44,6 +44,7 @@ Markus Koller (@toupeira)
|
|||||||
Justin Cheevers @justincheevers
|
Justin Cheevers @justincheevers
|
||||||
Talha Ahmed (@talha81) <talha.ahmed@gmail.com>
|
Talha Ahmed (@talha81) <talha.ahmed@gmail.com>
|
||||||
Matthew Tylee Atkinson (@matatk)
|
Matthew Tylee Atkinson (@matatk)
|
||||||
|
Pedro Ferrari (@petobens)
|
||||||
|
|
||||||
|
|
||||||
@something are github user names.
|
@something are github user names.
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ If you are a person who likes to use VIM-splits, you might want to put this in y
|
|||||||
|
|
||||||
let g:jedi#use_splits_not_buffers = "left"
|
let g:jedi#use_splits_not_buffers = "left"
|
||||||
|
|
||||||
This options could be "left", "right", "top" or "bottom". It will decide the direction where the split open.
|
This options could be "left", "right", "top", "bottom" or "winwidth". It will decide the direction where the split open.
|
||||||
|
|
||||||
Jedi automatically starts the completion, if you type a dot, e.g. ``str.``, if
|
Jedi automatically starts the completion, if you type a dot, e.g. ``str.``, if
|
||||||
you don't want this:
|
you don't want this:
|
||||||
|
|||||||
@@ -429,9 +429,14 @@ Default: 1
|
|||||||
If you want to open new split for "go to", you could set this option to the
|
If you want to open new split for "go to", you could set this option to the
|
||||||
direction which you want to open a split with.
|
direction which you want to open a split with.
|
||||||
|
|
||||||
Options: top, left, right or bottom
|
Options: top, left, right, bottom or winwidth
|
||||||
Default: "" (not enabled by default)
|
Default: "" (not enabled by default)
|
||||||
|
|
||||||
|
Note: with the 'winwidth' option the window is split vertically or horizontally
|
||||||
|
depending on the width of the window relative to 'textwidth'. This essentially
|
||||||
|
means that if the window is big enough it will be split vertically but if it is
|
||||||
|
small a horizontal split happens.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
6.11. `g:jedi#force_py_version` *g:jedi#force_py_version*
|
6.11. `g:jedi#force_py_version` *g:jedi#force_py_version*
|
||||||
|
|
||||||
|
|||||||
@@ -469,8 +469,11 @@ def new_buffer(path, options=''):
|
|||||||
'top': 'topleft split',
|
'top': 'topleft split',
|
||||||
'left': 'topleft vsplit',
|
'left': 'topleft vsplit',
|
||||||
'right': 'botright vsplit',
|
'right': 'botright vsplit',
|
||||||
'bottom': 'botright split'
|
'bottom': 'botright split',
|
||||||
|
'winwidth': 'vs'
|
||||||
}
|
}
|
||||||
|
if user_split_option == 'winwidth' and vim.current.window.width <= 2 * int(vim_eval("&textwidth ? &textwidth : 80")):
|
||||||
|
split_options['winwidth'] = 'sp'
|
||||||
if user_split_option not in split_options:
|
if user_split_option not in split_options:
|
||||||
print('g:jedi#use_splits_not_buffers value is not correct, valid options are: %s' % ','.join(split_options.keys()))
|
print('g:jedi#use_splits_not_buffers value is not correct, valid options are: %s' % ','.join(split_options.keys()))
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user