2019-03-04 03:28:35 -05:00
|
|
|
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'vifm') != -1
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2018-02-05 22:15:01 -05:00
|
|
|
" common functions for vifm plugin related to globals
|
|
|
|
" Maintainer: xaizek <xaizek@posteo.net>
|
2018-12-26 04:41:57 -05:00
|
|
|
" Last Change: November 03, 2018
|
2018-02-05 22:15:01 -05:00
|
|
|
|
|
|
|
" Initializes global variables to defaults unless they are already set
|
|
|
|
function! vifm#globals#Init()
|
|
|
|
if !exists('g:vifm_exec')
|
|
|
|
let g:vifm_exec = 'vifm'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if !exists('g:vifm_exec_args')
|
|
|
|
let g:vifm_exec_args = ''
|
|
|
|
endif
|
|
|
|
|
|
|
|
if !exists('g:vifm_term')
|
|
|
|
if has('win32')
|
|
|
|
if filereadable('C:\Windows\system32\cmd.exe')
|
|
|
|
let g:vifm_term = 'C:\Windows\system32\cmd.exe /C'
|
|
|
|
else
|
|
|
|
" If don't find use the integrate shell it work too
|
|
|
|
let g:vifm_term = ''
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
let g:vifm_term = 'xterm -e'
|
|
|
|
endif
|
|
|
|
endif
|
2018-12-26 04:41:57 -05:00
|
|
|
|
|
|
|
if !exists('g:vifm_embed_term')
|
|
|
|
let g:vifm_embed_term = has('gui_running')
|
|
|
|
endif
|
2018-02-05 22:15:01 -05:00
|
|
|
endfunction
|