Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Practical Vim
Table of Contents
What readers are saying about Practical Vim
Acknowledgments
Foreword
Read Me
How This Book Is Structured
A Note on the Examples
Learn to Touch Type, Then Learn Vim
Read the Forgotten Manual
Get to Know Vim’s Built-in Documentation
Notation for Simulating Vim on the Page
Downloading the Examples
Use Vim’s Factory Settings
On the Role of Vim Script
On Vim Versions
Chapter 1: The Vim Way
Meet the Dot Command
Don’t Repeat Yourself
Take One Step Back, Then Three Forward
Act, Repeat, Reverse
Find and Replace by Hand
Meet the Dot Formula
Part 1: Modes
Chapter 2: Normal Mode
Pause with Your Brush Off the Page
Chunk Your Undos
Compose Repeatable Changes
Use Counts to Do Simple Arithmetic
Don’t Count If You Can Repeat
Combine and Conquer
Chapter 3: Insert Mode
Make Corrections Instantly from Insert Mode
Get Back to Normal Mode
Paste from a Register Without Leaving Insert Mode
Do Back-of-the-Envelope Calculations in Place
Insert Unusual Characters by Character Code
Insert Unusual Characters by Digraph
Overwrite Existing Text with Replace Mode
Chapter 4: Visual Mode
Grok Visual Mode
Define a Visual Selection
Repeat Line-Wise Visual Commands
Prefer Operators to Visual Commands Where Possible
Edit Tabular Data with Visual-Block Mode
Change Columns of Text
Append After a Ragged Visual Block
Chapter 5: Command-Line Mode
Meet Vim’s Command Line
Execute a Command on One or More Consecutive Lines
Duplicate or Move Lines Using ‘:t’ and ‘:m’ Commands
Run Normal Mode Commands Across a Range
Repeat the Last Ex Command
Tab-Complete Your Ex Commands
Insert the Current Word at the Command Prompt
Recall Commands from History
Run Commands in the Shell
Part 2: Files
Chapter 6: Manage Multiple Files
Track Open Files with the Buffer List
Group Buffers into a Collection with the Argument List
Manage Hidden Files
Divide Your Workspace into Split Windows
Organize Your Window Layouts with Tab Pages
Chapter 7: Open Files and Save Them to Disk
Open a File by Its Filepath Using ‘:edit’
Open a File by Its Filename Using ‘:find’
Explore the File System with netrw
Save Files to Nonexistent Directories
Save a File as the Super User
Part 3: Getting Around Faster
Chapter 8: Navigate Inside Files with Motions
Keep Your Fingers on the Home Row
Distinguish Between Real Lines and Display Lines
Move Word-Wise
Find by Character
Search to Navigate
Trace Your Selection with Precision Text Objects
Delete Around, or Change Inside
Mark Your Place and Snap Back to It
Jump Between Matching Parentheses
Chapter 9: Navigate Between Files with Jumps
Traverse the Jump List
Traverse the Change List
Jump to the Filename Under the Cursor
Snap Between Files Using Global Marks
Part 4: Registers
Chapter 10: Copy and Paste
Delete, Yank, and Put with Vim’s Unnamed Register
Grok Vim’s Registers
Replace a Visual Selection with a Register
Paste from a Register
Interact with the System Clipboard
Chapter 11: Macros
Record and Execute a Macro
Normalize, Strike, Abort
Play Back with a Count
Repeat a Change on Contiguous Lines
Append Commands to a Macro
Act Upon a Collection of Files
Evaluate an Iterator to Number Items in a List
Edit the Contents of a Macro
Part 5: Patterns
Chapter 12: Matching Patterns and Literals
Tune the Case Sensitivity of Search Patterns
Use the \v Pattern Switch for Regex Searches
Use the \V Literal Switch for Verbatim Searches
Use Parentheses to Capture Submatches
Stake the Boundaries of a Word
Stake the Boundaries of a Match
Escape Problem Characters
Chapter 13: Search
Meet the Search Command
Highlight Search Matches
Preview the First Match Before Execution
Count the Matches for the Current Pattern
Offset the Cursor to the End of a Search Match
Operate on a Complete Search Match
Create Complex Patterns by Iterating upon Search History
Search for the Current Visual Selection
Chapter 14: Substitution
Meet the Substitute Command
Find and Replace Every Match in a File
Eyeball Each Substitution
Reuse the Last Search Pattern
Replace with the Contents of a Register
Repeat the Previous Substitute Command
Rearrange CSV Fields Using Submatches
Perform Arithmetic on the Replacement
Swap Two or More Words
Find and Replace Across Multiple Files
Chapter 15: Global Commands
Meet the Global Command
Delete Lines Containing a Pattern
Collect TODO Items in a Register
Alphabetize the Properties of Each Rule in a CSS File
Part 6: Tools
Chapter 16: Index and Navigate Source Code with ctags
Meet ctags
Configure Vim to Work with ctags
Navigate Keyword Definitions with Vim’s Tag Navigation Commands
Chapter 17: Compile Code and Navigate Errors with the Quickfix List
Compile Code Without Leaving Vim
Browse the Quickfix List
Recall Results from a Previous Quickfix List
Customize the External Compiler
Chapter 18: Search Project-Wide with grep, vimgrep, and Others
Call grep Without Leaving Vim
Customize the grep Program
Grep with Vim’s Internal Search Engine
Chapter 19: Dial X for Autocompletion
Meet Vim’s Keyword Autocompletion
Work with the Autocomplete Pop-Up Menu
Understand the Source of Keywords
Autocomplete Words from the Dictionary
Autocomplete Entire Lines
Autocomplete Filenames
Autocomplete with Context Awareness
Chapter 20: Find and Fix Typos with Vim’s Spell Checker
Spell Check Your Work
Use Alternate Spelling Dictionaries
Add Words to the Spell File
Fix Spelling Errors from Insert Mode
Chapter 21: Now What?
21.1 Keep Practicing!
21.2 Make Vim Your Own
21.3 Know the Saw, Then Sharpen It
Appendix 1: Customize Vim to Suit Your Preferences
A1.1 Change Vim’s Settings on the Fly
A1.2 Save Your Configuration in a vimrc File
A1.3 Apply Customizations to Certain Types of Files
You May Be Interested In…
← Prev
Back
Next →
← Prev
Back
Next →