Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
ex commands enable you to switch between multiple files. The advantage is speed. When you are sharing the system with other users, it takes time to exit and re-enter vi for each file you want to edit. Staying in the same editing session and traveling between files is not only faster for access, but you also save abbreviations and command sequences that you have defined, and you keep yank buffers (Section 17.4) so that you can copy text from one file to another.
When you first invoke vi, you can name more than one file to edit and then use ex commands to travel between the files: