diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2015-02-11 11:27:11 -0800 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-02-11 11:27:11 -0800 |
commit | 6cd2d5417d728ea96c5c52b34629c944a89eec60 (patch) | |
tree | f6d49573e7a22b1ede56055d3952707eab085c18 /ftplugin/latex-box/common.vim | |
parent | b7a30b1f1a963902d9743ae229a1f9d18b887e17 (diff) | |
download | vim-polyglot-1.11.4.tar.gz vim-polyglot-1.11.4.zip |
Updatev1.11.4
Diffstat (limited to 'ftplugin/latex-box/common.vim')
-rw-r--r-- | ftplugin/latex-box/common.vim | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/ftplugin/latex-box/common.vim b/ftplugin/latex-box/common.vim index bf6305cc..59cf95d6 100644 --- a/ftplugin/latex-box/common.vim +++ b/ftplugin/latex-box/common.vim @@ -64,14 +64,24 @@ setlocal efm+=%-G%.%# " Vim Windows {{{ -" Width of vertical splits +" Type of split, "new" for horiz. "vnew" for vert. +if !exists('g:LatexBox_split_type') + let g:LatexBox_split_type = "vnew" +endif + +" Length of vertical splits +if !exists('g:LatexBox_split_length') + let g:LatexBox_split_length = 15 +endif + +" Width of horizontal splits if !exists('g:LatexBox_split_width') let g:LatexBox_split_width = 30 endif -" Where vertical splits appear +" Where splits appear if !exists('g:LatexBox_split_side') - let g:LatexBox_split_side = "leftabove" + let g:LatexBox_split_side = "aboveleft" endif " Resize when split? @@ -229,12 +239,18 @@ endfunction " Default pdf viewer if !exists('g:LatexBox_viewer') - if has('win32') - " On windows, 'running' a file will open it with the default program - let g:LatexBox_viewer = '' - else - let g:LatexBox_viewer = 'xdg-open' + " On windows, 'running' a file will open it with the default program + let s:viewer = '' + if has('unix') + " echo -n necessary as uname -s will append \n otherwise + let s:uname = system('echo -n $(uname -s)') + if s:uname == "Darwin" + let s:viewer = 'open' + else + let s:viewer = 'xdg-open' + endif endif + let g:LatexBox_viewer = s:viewer endif function! LatexBox_View(...) |