Skip to main content

Questions tagged [operator-pending-mode]

For questions about operator-pending mode, which is the mode after triggering an operator but before specifying a motion or text-object to operate on.

1 vote
1 answer
126 views

I'm using Vim 9.1.1550 which I've updated today (my package manager compiled/packaged it Jul 15 2025). Since this update, Vim now displays pending operators on the bottom right by default. What is the ...
QSmally's user avatar
  • 13
0 votes
2 answers
69 views

I read the example in :h map-operator which does the job but it is very convoluted. I am wondering if there is a simpler way to save/restore options before/after having set 'opfunc' and run g@. My ...
Barzi2001's user avatar
  • 1,133
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
0 votes
1 answer
48 views

As far as I can tell, selection in Visual mode using most text objects results in the cursor being placed at the end of the text object region, whether that's linewise or characterwise. However, using ...
shadowtalker's user avatar
1 vote
0 answers
87 views

I need to programmatically input a motion in operation-pending mode, kinda like using :normal!, but without switching modes, so the operator still takes effect. Context I'm writing a script that ...
Tae's user avatar
  • 2,195
1 vote
1 answer
77 views

I'm trying to redefine my inner and outer line text objects so that they don't change gv. First I had onoremap <silent> il :<C-u>normal! $v^<CR> I changed it based on Using visual ...
user avatar
3 votes
1 answer
482 views

I have a german keyboard and \ is hard to reach, so I added the following line to my config: map ß \ This works fine for simple leader commands, and I did not have to change my leader command in case ...
Kaio's user avatar
  • 673
3 votes
1 answer
217 views

I read on an old none commentable reddit that Tpope no longer uses his vim-repeat plugin, and instead uses g@. I have used g@ in plugins, and unstand you set opfunc first, then g@{motion} will run ...
run_the_race's user avatar
1 vote
1 answer
113 views

I would like to test in an operator-pending mapping whether the cursor is on the last position of the line. I currently have this, but it does not work: onoremap <expr> i$ col('.') == col('$') ?...
Serge Stroobandt's user avatar
1 vote
1 answer
188 views

The following operator-depending mapping works great for me, onoremap <silent> a$ :<C-U>normal! hEF$v,<CR> except when it is issued at the very beginning of a line. What happens is ...
Serge Stroobandt'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
3 votes
1 answer
164 views

Situation Recently I was investigating the behaviour of word motions in vim and to me it seems like ge is grossly inconsistent with the other 3. Here is an example with ^ showing the cursor: word1 ...
Karolis Koncevičius's user avatar
5 votes
5 answers
2k views

I understand that we can use da{ to delete a whole {} block in vim. I am wondering if there is a corresponding version with { replaced by $ (similarly for di{) as this would be very useful for people ...
weirdo's user avatar
  • 153
2 votes
1 answer
87 views

If I'm in command mode with default vim and I press the right angle key, the cursor switches from the normal block to a short version. What is the function of this? (Sometimes it seems related to ...
Greg's user avatar
  • 23
2 votes
1 answer
337 views

Last week, I turned off 'number' and have been using only 'relativenumber', plus a line/column count in my status line. I don't really look at line numbers that much. But now I've had a radical idea. ...
D. Ben Knoble's user avatar

15 30 50 per page