← All lessons

18. Ex Commands Addresses And Ranges

Step 1 of 6

Basic Ex commands

You issue Ex commands using the Vim command line, accessed through : in normal mode. Many of the commands that you use on a day-to-day basis might be inherited Ex commands.

To show you how ubiquitous they are: if you know how to write a buffer to a file in Vim (hint: :w), congratulations! You’ve been using Ex commands all along. To be precise, :w is an Ex command that is usually used to write the contents of the buffer to a file.

There are lots of Ex commands — far too many to enumerate here — but here are a few that are useful time and time again:

Give this a try in the editor. For each of the lines, give the commands above a test drive.

Loading editor…