mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated vimrc
This commit is contained in:
@ -8,3 +8,15 @@ function! snipmate#util#add_methods(sfile, namespace, methods) abort
|
||||
endfor
|
||||
return dict
|
||||
endfunction
|
||||
|
||||
function! snipmate#util#eval(arg)
|
||||
try
|
||||
let ret = eval(a:arg)
|
||||
catch
|
||||
echohl ErrorMsg
|
||||
echom 'SnipMate:Expression: ' . v:exception
|
||||
echohl None
|
||||
let ret = ''
|
||||
endtry
|
||||
return type(ret) == type('') ? ret : string(ret)
|
||||
endfunction
|
||||
|
Reference in New Issue
Block a user