The textobj-dotseparated plugin provides two new text-objects which are
triggered by a.
and i.
respectively. You can use them when you have to
deal with the following type of words:
- foo.bar.baz
Now, suppose you have to change bar to qux (* for cursor position). You can do the following:
foo.b*ar.bar
and type ci.
to get foo.*.bar
. Or you can type da.
to get
foobar
.
Variable or function names containing dots to separate subwords are often found in the programming language R or in other languages where dots are used for accessing properties of an object.
I recommend installing the plugin via vundle or vim-plig.
You can also unzip it in your ~/.vim
directory. The plugin depends on
vim-textobj-user by
kana.
So you need to install it in order to use this plugin.
- The README and doc file are largely copied from vim-textobj-underscore by lucapette.
- Help when making this small plugin was provided by reddit user VanLaser. Thanks alot.
Copyright (c) Robin Hafen. Distributed under the same terms as Vim itself.