added split support for goto action

This commit is contained in:
LittleQ
2013-09-14 23:33:40 +08:00
parent 45dd72b557
commit 1c24594c70
3 changed files with 29 additions and 0 deletions

View File

@@ -399,6 +399,24 @@ def new_buffer(path, options=''):
# options are what you can to edit the edit options
if vim_eval('g:jedi#use_tabs_not_buffers') == '1':
_tabnew(path, options)
elif vim_eval('g:jedi#use_splits_not_buffers'):
user_split_option = vim_eval('g:jedi#use_splits_not_buffers')
split_options = [
'top',
'right',
'left',
'bottom'
]
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))
else:
VIM_SPLIT_COMMAND = {
'top': 'topleft split',
'left': 'topleft vsplit',
'right': 'botright vsplit',
'bottom': 'botright split'
}
vim_command(VIM_SPLIT_COMMAND[user_split_option] + " %s" % path)
else:
if vim_eval("!&hidden && &modified") == '1':
if vim_eval("bufname('%')") is None: