From 3d251625c01701eb0d54b66f731fd54b1aac6a70 Mon Sep 17 00:00:00 2001 From: IdanArye Date: Thu, 22 May 2014 19:14:34 +0300 Subject: [PATCH] Add the function vebugger#util#getToolFullPath --- autoload/vebugger/util.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/autoload/vebugger/util.vim b/autoload/vebugger/util.vim index f59fd83..e5b18e4 100644 --- a/autoload/vebugger/util.vim +++ b/autoload/vebugger/util.vim @@ -57,3 +57,14 @@ function! s:argEscape(arg) return '"'.escape(a:arg,'"').'"' end endfunction + +"Return a tool's(usually debugger) full path, or revert to default if that +"path is not defined +function! vebugger#util#getToolFullPath(toolName,default) + let l:optionName='vebugger_path_'.a:toolName + if exists('g:'.l:optionName) + return g:[l:optionName] + else + return a:default + endif +endfunction