diff options
author | Peter Odding <peter@peterodding.com> | 2011-06-26 21:53:16 +0200 |
---|---|---|
committer | Peter Odding <peter@peterodding.com> | 2011-06-26 21:53:16 +0200 |
commit | e228b0e4e2cece3bbcbd3a752e7c718a455ab7c6 (patch) | |
tree | a6e9a3e7566fdfeac09a8bd5a3d478ea9bc246e5 | |
parent | 38996d3c8d7d55617a840d3cb22ad650bc7b60e0 (diff) | |
download | vim-easytags-e228b0e4e2cece3bbcbd3a752e7c718a455ab7c6.tar.gz |
Option handling with xolox#misc#option#get({name}, {default})
-rw-r--r-- | option.vim | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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) |