vi tips and tricks: Ten cool commands sure to impress your friends
When coming to grips with the vi editor—either for the first time or as a regular user—most people tend to have a grasp of the core command set that allows them to perform those functions they use most regularly: navigating or saving a file; inserting, updating, deleting, or searching for data; or quitting without saving changes.
However, the vi editor is extremely powerful and rich in features and functionality. Even after many years of use, you can still uncover new commands that you didn't realize existed. The commands covered in this article are amongst those less well known, but they can help you to work smarter by short-cutting existing methods you may use or allowing you to do something that you never realized you could do with vi.
Before we start just a recap on the two modes of vi: command and insert. Command mode allows the user to execute commands to modify text, navigate around the file or control your vi session in some way. Insert mode puts anything you type into the current file in your vi session. When you start vi you start in command mode. Once in insert mode you can switch back to command mode by hitting the Escape key. Hitting the Escape key whilst in command mode leaves you in command mode. All of the commands covered in this article should be executed from command mode.
Read full article from vi tips and tricks: Ten cool commands sure to impress your friends
No comments:
Post a Comment