From 30c15e82111d2297bd6b14ed5c8481d030dc52c7 Mon Sep 17 00:00:00 2001 From: doy Date: Tue, 23 Dec 2008 02:18:06 -0500 Subject: convert regex textobj to allow arbitrary paired characters --- vim/plugin/textobj.vim | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vim/plugin/textobj.vim b/vim/plugin/textobj.vim index a603443..1a3769f 100644 --- a/vim/plugin/textobj.vim +++ b/vim/plugin/textobj.vim @@ -57,15 +57,15 @@ function Textobj(char, callback, ...) endfunction " }}} " Text object definitions {{{ -" / for regex {{{ -function s:textobj_regex(inner, count) +" arbitrary paired symbols (/ for regex, etc) {{{ +function Textobj_paired(inner, count, char) let pos = getpos('.') let line = strpart(getline(pos[1]), 0, pos[2]) let lines = getline(1, pos[1] - 1) + [line] let linenum = pos[1] for line in reverse(lines) - let objstart = match(line, '.*\zs\\\@