Vim Recipes
‣
Table of Contents
Table of Contents
Introduction
Conventions
Contributing
License
Credits
Basics
Choosing the Right Mode
Basic Navigation
Opening Files
Saving a File
Quitting Vim
Deleting Text
Visually Selecting Text
Copying, Cutting, and Pasting
Configuring Vim
Printing
Getting Help
Editing
Indenting Lines
Selecting Text with Motions
Repeating Commands
Changing the Case of Text
Sorting Text
Executing External Commands
Managing Sessions
Formatting with an External Program
Working with Different File Formats
Typing
Spell Checking
Using Templates
Undoing Mistakes
Auto-Completing Text
Abbreviating Common Strings
Inserting Accented or "Foreign" Characters
Opening the File Name Beneath the Cursor
Inserting the Date
Inserting Snippets
Navigation
Navigating Text Files
Navigating Source Code
Navigating the Viewport
Navigating Buffers
Navigating Tabs
Manually Creating Folds
Navigating Folds
Splitting the Screen
Navigating Marks
Navigating Tags
Bookmarking Lines with Visible Markers (Signs)
GUI (GVim)
Changing the Font
Maximising Screen Space
Creating Menus and Toolbar Buttons
Searching
Searching for any Word
Searching Over Multiple Files
Searching and Replacing
Searching for the Word Beneath the Cursor
Creating Regular Expressions
Looking up Documentation for the Keyword Under the Cursor
Display
Working with Long Lines
Displaying Line Numbers
Working with Remote Files
Changing the Status Line
Redefining Highlight Groups
Modifying the Cursor
Changing the Window Title
Extending
Creating Keyboard Shortcuts with Key Mappings
Changing the Colour Scheme
Creating Command-Line Commands
Extending Vim with Scripts and Plugins
Integrating Vim with Git
Other Uses of Vim
Browsing Directories
Using Vim as a File Manager
Viewing Differences Between Files
Outlining a Document