Vim is a fast and efficient text editor that will make you a faster and more efficient developer. It’s available on almost every OS—if you master the techniques in this book, you’ll never need another text editor. In more than 100 Vim tips, you’ll quickly learn the editor’s core functionality and tackle your trickiest editing and writing tasks.
About this Book
- 346 pages
- Release: P1.1 (2012-10-31)
- ISBN: 978-1-93435-698-2
Vim, a vast improvement over its classic ancestor vi, is a serious tool for programmers, web developers, and sysadmins. No other text editor comes close to Vim for speed and efficiency; it runs on almost every system imaginable and supports most coding and markup languages.
Learn how to edit text the “Vim way”: complete a series of repetitive changes with The Dot Formula, using one keystroke to strike the target, followed by one keystroke to execute the change. Automate complex tasks by recording your keystrokes as a macro. Run the same command on a selection of lines, or a set of files.
Discover the “very magic” switch, which makes Vim’s regular expression syntax more like Perl’s. Build complex patterns by iterating on your search history. Search inside multiple files, then run Vim’s substitute command on the result set for a project-wide search and replace. All without installing a single plugin!
You’ll learn how to navigate text documents as fast as the eye moves—with only a few keystrokes. Jump from a method call to its definition with a single command. Use Vim’s jumplist, so that you can always follow the breadcrumb trail back to the file you were working on before. Discover a multilingual spell-checker that does what it’s told.
Practical Vim will show you new ways to work with Vim more efficiently, whether you’re a beginner or an intermediate Vim user.
All this, without having to touch the mouse.
What You Need:
Vim version 7
Contents and Extracts
- The Vim Way excerpt
- Normal Mode
- Insert Mode
- Visual Mode
- Command-Line Mode
- Manage Multiple Files
- Open Files and Save Them to Disk
- Getting Around Faster
- Navigate Inside Files with Motions
- Navigate Between Files with Jumps
- Copy and Paste
- Macros excerpt
- Matching Patterns and Literals
- Search excerpt
- Global Commands
- Index and Navigate Source Code with ctags
- Compile Code and Navigate Errors with the Quickfix List
- Search Project-Wide with grep, vimgrep, and Others
- Dial X for Autocompletion
- Find and Fix Typos with Vim’s Spell Checker
- Customize Vim to Suit Your Preferences
Comments and Reviews
Jonathan Roberts said:
Linux Format Magazine
9/10: Instead of being a simple reference, listing different key combinations and their effects, Practical Vim focuses on real scenarios, presents different options and looks to explain why one approach might be better than another…
—Javier Collado QA Automation Engineer Canonical Ltd.
Practical Vim bridges the gap between the official documentation and how to really use Vim. After reading a few chapters, I switched to using Vim as my default editor. I’ve never looked back.
—Anders Janmyr Developer Jayway
Drew has continued the wonderful work he has done with Vimcasts in this book, a must-read for anyone serious about Vim.
—John P. Daigle Developer ThoughtWorks, Inc.
Practical Vim continues to change what I believe a text editor can do.
—Henrik Nyh Software Engineer
After reading a couple of chapters of Practical Vim, I realized how little I knew. From intermediate to beginner in thirty minutes!
—Robert Evans Software Engineer Code Wranglers
I’ve learned more about Vim by reading this book than I have from any other resource.