Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 2920

Vim's "count" feature allows you to multiply or iterate a command by passing it an optional number. Questions about counting things should use the "counting" tag instead.

25 votes
5 answers
8k views

Can I repeat a macro with the "dot operator"?

Can I repeat a macro with the . command? For example, I'd like to be able to type: @q... and have it effectively call @q 4 times. With the default behavior, this works only if 'q' holds a single co …
DJMcMayhem's user avatar
  • 17.9k
2 votes
1 answer
628 views

Can I make all "resize split" commands take a default count?

While reading through this answer, I found these useful commands: Ctrl+W +/-: increase/decrease height Ctrl+W >/<: increase/decrease width These are super useful, but I hate how it defaults to res …
DJMcMayhem's user avatar
  • 17.9k
5 votes
2 answers
115 views

Can I make the indent commands take an additional count that doesn't affect the motion?

In my mind, this is a total waste, because if the count before the operator was "indent level", and the count after is for a repeated motion, this doesn't lose any ability. … If I wanted to indent the next four lines one time, I could just do >4> or even >3j If the first count were to work this way, you could even do a command like this: 2>4> And this would mean " …
DJMcMayhem's user avatar
  • 17.9k
9 votes
2 answers
822 views

How to allow count *before* my custom operator?

I've reproduced this bug in Vim 8.0 on Windows and Ubuntu and in Neovim 0.2.1 on Windows) So how can I define my operator so that a count works the same before or after the operator? … I realize that this is a very minor difference, and that for most intents and purposes, I can simply get around it by always doing the count afterwards. …
DJMcMayhem's user avatar
  • 17.9k