diff --git a/autoload/vimtex/index.vim b/autoload/vimtex/index.vim index 2d102c4..7249d2d 100644 --- a/autoload/vimtex/index.vim +++ b/autoload/vimtex/index.vim @@ -62,12 +62,16 @@ function! vimtex#index#create(index) " {{{1 unlet FnVal endfor - if g:vimtex_index_resize - silent exe 'set columns +=' . g:vimtex_index_split_width + if g:vimtex_index_split_pos ==# 'full' + silent execute 'edit' escape(a:index.name, ' ') + else + if g:vimtex_index_resize + silent exe 'set columns +=' . g:vimtex_index_split_width + endif + silent execute + \ g:vimtex_index_split_pos g:vimtex_index_split_width + \ 'new' escape(a:index.name, ' ') endif - silent execute - \ g:vimtex_index_split_pos g:vimtex_index_split_width - \ 'new' escape(a:index.name, ' ') let b:index = a:index setlocal bufhidden=wipe diff --git a/doc/vimtex.txt b/doc/vimtex.txt index d8277e1..b4fe580 100644 --- a/doc/vimtex.txt +++ b/doc/vimtex.txt @@ -545,7 +545,10 @@ Options~ Default value: 1 *g:vimtex_index_split_pos* - Define where index windows should be opened. + Define where index windows should be opened. This is a string that contains + either the word 'full' to open in the current window, or any of the position + commands, i.e. one or more of |:vertical|, |:leftabove|, |:rightbelow|, |:topleft|, + and |:botright|. Default value: 'vert leftabove'