Is there any difference between doing the following two commands:




Or is v an alias for g! ?

  • 3
    You will get your answer instantly if you how how to use the built in help, I suggest you read this post.
    – dedowsdi
    Apr 25 '20 at 3:08
  • @dedowsdi yea it takes me a good deal of time to navigate their docs, for example: E149: Sorry, no help for g!, and v brings up visual mode.
    – David542
    Apr 25 '20 at 3:11
  • Make sure you spend enough time to read it, try it, there is also :h {subject}, no one can use vim properly without knowing how to use the :h, it should always be your first choice when you have questions.
    – dedowsdi
    Apr 25 '20 at 3:14
  • It might take a lot of time to know :h, but trust me, it's totally worth it, it's one of the most used command for all vimmers.
    – dedowsdi
    Apr 25 '20 at 3:21
  • 1
    @David542 If you're looking for help on Ex commands you need to include the :, you need :help :v. The ! version is documented together with the original, so it will be under :help :g.
    – filbranden
    Apr 25 '20 at 4:05

Yes, they're the same.

As :help :v says:

Same as :g!.

(That's the whole contents of that help entry.)

You'll find the description for :g! under :help :g, just below the description of :g itself:


Execute the Ex command [cmd] (default :p) on the lines within [range] where {pattern} does NOT match.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.