The command :!cmd executes the program cmd, then returns to vi. For example, :!sh starts a new shell without exiting vi; when you quit the shell (by typing exit or <Ctrl>D), you return to vi.