aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--option.vim12
1 files changed, 11 insertions, 1 deletions
diff --git a/option.vim b/option.vim
index f785e1b..8c6d63d 100644
--- a/option.vim
+++ b/option.vim
@@ -1,8 +1,18 @@
" Vim auto-load script
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: March 15, 2011
+" Last Change: June 26, 2011
" URL: http://peterodding.com/code/vim/misc/
+function! xolox#misc#option#get(name, default)
+ if exists('g:' . a:name)
+ return eval('g:' . a:name)
+ elseif exists('b:' . a:name)
+ return eval('b:' . a:name)
+ else
+ return a:default
+ endif
+endfunction
+
" Functions to parse multi-valued Vim options like &tags and &runtimepath.
function! xolox#misc#option#split(value)