From 313b3d862f060b304e90119381afabc45a1d2409 Mon Sep 17 00:00:00 2001 From: doy Date: Tue, 23 Dec 2008 02:18:54 -0500 Subject: make textobj creation into config again, since the functions don't get defined until after the vimrc file is read (i think?) --- vim/plugin/textobj.vim | 5 +++++ vimrc | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/vim/plugin/textobj.vim b/vim/plugin/textobj.vim index a9f8624..bd85680 100644 --- a/vim/plugin/textobj.vim +++ b/vim/plugin/textobj.vim @@ -231,3 +231,8 @@ function Textobj_arg(inner, count) endfunction " }}} " }}} +" Text object loading {{{ +for object in g:Textobj_defs + call call('Textobj', object) +endfor +" }}} diff --git a/vimrc b/vimrc index fcff942..654e864 100644 --- a/vimrc +++ b/vimrc @@ -280,9 +280,11 @@ if file_readable(s:session_file) && expand("%:.") !~ '^/' endif " }}} " Textobj {{{ -call Textobj('/', "Textobj_paired", '/') -call Textobj('f', "Textobj_fold") -call Textobj(',', "Textobj_arg") +let g:Textobj_defs = [ + \['/', 'Textobj_paired', '/'], + \['f', 'Textobj_fold'], + \[',', 'Textobj_arg'], +\] " }}} " }}} -- cgit v1.2.3