Closed oblitzitate closed 1 week ago
Nevermind. I realized what I was looking for was to force linewise mode
Nevermind. I realized what I was looking for was to force linewise mode
Sure, this is already supported.
However, returning different region depending on the operator is also technically possible, as specification allows callable objects. Thus the returned region/pattern can be conditioned on vim.v.operator
(see :h v:operator
), but beware of doing so only in Operator-pending mode (not Visual).
Contributing guidelines
Module(s)
mini.ai
Description
For example,
dd
andyy
applies on the whole line and the newline char, andcc
applies from the first non-whitespace character to the end of the line.Another example is
dip
,yip
, andvip
applies on the whole block and the newline char, andcip
applies from the first non-whitespace character to the end of the line.I would like to be able to create a textobject that applies differently depending on the operator.
Edit: I noticed, it's often the
change
operator that has a different starting position, so if not this feature request, then maybe a feature that allows to set where the change starts?