This plugin make a text object mappings i.
and a.
.
i.
is a union ofi(
,i{
,i[
,i'
,i"
andi<
.a.
is a union ofa(
,a{
,a[
,a'
,a"
anda<
.
i.
and a.
match all of them.
call textobj#user#plugin('anyblock', {
\ '-' : {
\ 'select-a' : 'a.', '*select-a-function*' : 'textobj#anyblock#select_a',
\ 'select-i' : 'i.', '*select-i-function*' : 'textobj#anyblock#select_i',
\ },
\ })
This plugin depends on vim-textobj-user. Please install it in advance.
If you want to change the blocks which i.
and a.
match, define
g:textobj#anyblock#blocks
. For example, if you install
vim-textobj-between and want to
match `...`
, set [ '(', '{', '[', '"', "'", '<' , 'f`']
to it.
If you want to define buffer local blocks, set them to
b:textobj_anyblock_buffer_local_blocks
as list of string.
Copyright (c) 2013 rhysd MIT License.