Skip to main content

Questions tagged [operator]

0 votes
1 answer
74 views

What I want to understand Why does the following command inoremap <expr> <Tab> (1 || 1) ? 'yes' : 'no' fails with the error Error detected while processing /home/nathan/.vimrc: line 1: ...
NRagot's user avatar
  • 145
1 vote
1 answer
146 views

This has been discussed on Vim’s issue tracker. By default for the default builtin motions where the 'indside' of a text object is empty - such as double quote (say we have the following text "&...
user2742982's user avatar
2 votes
1 answer
294 views

How can I make a custom operator function that can programmatically reuse the motion that the user called it with? E.g. I want to map the operator m so that miw goes to the start of the file and then ...
user avatar
1 vote
1 answer
50 views

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 ...
Alfa07's user avatar
  • 111
9 votes
2 answers
2k views

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. ...
awvalenti's user avatar
  • 361
0 votes
1 answer
42 views

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 ...
pxeger's user avatar
  • 111
4 votes
3 answers
507 views

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> ...
Sebastian Müller's user avatar
4 votes
1 answer
735 views

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 ...
run_the_race's user avatar
2 votes
1 answer
254 views

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 ...
vvv's user avatar
  • 53
2 votes
1 answer
356 views

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 ...
user2662833's user avatar
0 votes
0 answers
149 views

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 ...
Blasco's user avatar
  • 275
0 votes
2 answers
297 views

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 ...
Blasco's user avatar
  • 275
1 vote
1 answer
222 views

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
dedowsdi's user avatar
  • 6,468