Questions tagged [operator]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
17 views

How to make dot replay embedded normal command? e.g in insert mode: <c-o>ysiw>Some<esc>

For example: OpRef ^- cursor I press <c-o>ysiw>Option<esc> in insert mode to get: Option<OpRef> I want to repeat this command with dot operator, but when I press dot it only ...
3
votes
2answers
140 views

On string concatenation, what's the difference between . and .. (single dot and double dot)?

From the :execute help (:h :exe): *:exe* *:execute* :exe[cute] {expr1} .. Executes the string that results from the evaluation of {expr1} as an Ex command. ...
0
votes
1answer
16 views

Make j and k act character-wise when used with operators

When I use j or k with operators, they make the operator act line-wise - acting over two whole lines, as if I had used Vj/Vk. I want them to act character-wise so that they act until the current ...
2
votes
2answers
103 views

Keep cursor from moving when using operators

I'm trying to implement a custom operator following :h :map-operator. The operator works just fine but has the side effect of moving the cursor position! For example the code defining the <F4> ...
3
votes
1answer
113 views

Creating custom text objects via omap - How to run functions after the motion

I've done extensive reading including :h omap-info and Vim the hardway operator pending mode, this part is espcially good: A good way to keep the multiple ways of creating operator-pending mappings ...
2
votes
1answer
93 views

Why doesn't d_ delete to the first non-blank character on the line?

v^ and v_ both select to the first non-blank character on the line. d^ deletes to the first non-blank character on the line, but d_ deletes the entire line. Why is this? Is there any reason to use ...
2
votes
1answer
162 views

Operator Modifier

I have been using vim mode for atom for quite a while, recently I've been trying to switch to nvim, but I can't seem to find a way to replicate the operator modifiers behaviour, which I've come to ...
0
votes
0answers
56 views

Find out last used text object

I'm trying to figure out a way to make a repeatable operator insert. To do so I'm trying to make use of tpope/repeat. My idea is to set a repeatable call that repeats the last operation, repeating the ...
0
votes
2answers
134 views

Making operator insert and append repeatable

Is there an insert and append operation that can be followed by a text-object? I've found this plugins: https://github.com/deris/vim-operator-insert https://github.com/mwgkgk/vim-operator-insert ...
1
vote
1answer
116 views

How to create new operator by using existing operator with current motion?

function! OperatorFunc(type, ...) " how to call another operator with current motion? " do other stuff endfunction Is it possible to get motion text? such as get iw from yiw