Table of contents

Getting Started

Read this from start to end to learn the essential commands.

01. About the manuals

  1. Two manuals
  2. Vim installed
  3. Using the Vim tutor
  4. Copyright

02. The first steps in Vim

  1. Running Vim for the First Time
  2. Inserting text
  3. Moving around
  4. Deleting characters
  5. Undo and Redo
  6. Other editing commands
  7. Getting out
  8. Finding help

03. Moving around

  1. Word movement
  2. Moving to the start or end of a line
  3. Moving to a character
  4. Matching a paren
  5. Moving to a specific line
  6. Telling where you are
  7. Scrolling around
  8. Simple searches
  9. Simple search patterns
  10. Using marks

04. Making small changes

  1. Operators and motions
  2. Changing text
  3. Repeating a change
  4. Visual mode
  5. Moving text
  6. Copying text
  7. Using the clipboard
  8. Text objects
  9. Replace mode
  10. Conclusion

05. Set your settings

  1. The vimrc file
  2. The example vimrc file explained
  3. The defaults.vim file explained
  4. Simple mappings
  5. Adding a package
  6. Adding a plugin
  7. Adding a help file
  8. The option window
  9. Often used options

06. Using syntax highlighting

  1. Switching it on
  2. No or wrong colors?
  3. Different colors
  4. With colors or without colors
  5. Printing with colors
  6. Further reading

07. Editing more than one file

  1. Edit another file
  2. A list of files
  3. Jumping from file to file
  4. Backup files
  5. Copy text between files
  6. Viewing a file
  7. Changing the file name

08. Splitting windows

  1. Split a window
  2. Split a window on another file
  3. Window size
  4. Vertical splits
  5. Moving windows
  6. Commands for all windows
  7. Viewing differences with vimdiff
  8. Various

09. Using the GUI

  1. Parts of the GUI
  2. Using the mouse
  3. The clipboard
  4. Select mode

10. Making big changes

  1. Record and playback commands
  2. Substitution
  3. Command ranges
  4. The global command
  5. Visual block mode
  6. Reading and writing part of a file
  7. Formatting text
  8. Changing case
  9. Using an external program

11. Recovering from a crash

  1. Basic recovery
  2. Where is the swap file?
  3. Crashed or not?
  4. Further reading

12. Clever tricks

  1. Replace a word
  2. Change "Last, First" to "First Last"
  3. Sort a list
  4. Reverse line order
  5. Count words
  6. Find a man page
  7. Trim blanks
  8. Find where a word is used

Editing Effectively

Subjects that can be read independently.

20. Typing command-line commands quickly

  1. Command line editing
  2. Command line abbreviations
  3. Command line completion
  4. Command line history
  5. Command line window

21. Go away and come back

  1. Suspend and resume
  2. Executing shell commands
  3. Remembering information; viminfo
  4. Sessions
  5. Views
  6. Modelines

22. Finding the file to edit

  1. The file explorer
  2. The current directory
  3. Finding a file
  4. The buffer list

23. Editing other files

  1. DOS, Mac and Unix files
  2. Files on the internet
  3. Encryption
  4. Binary files
  5. Compressed files

24. Inserting quickly

  1. Making corrections
  2. Showing matches
  3. Completion
  4. Repeating an insert
  5. Copying from another line
  6. Inserting a register
  7. Abbreviations
  8. Entering special characters
  9. Digraphs
  10. Normal mode commands

25. Editing formatted text

  1. Breaking lines
  2. Aligning text
  3. Indents and tabs
  4. Dealing with long lines
  5. Editing tables

26. Repeating

  1. Repeating with Visual mode
  2. Add and subtract
  3. Making a change in many files
  4. Using Vim from a shell script

27. Search commands and patterns

  1. Ignoring case
  2. Wrapping around the file end
  3. Offsets
  4. Matching multiple times
  5. Alternatives
  6. Character ranges
  7. Character classes
  8. Matching a line break
  9. Examples

28. Folding

  1. What is folding?
  2. Manual folding
  3. Working with folds
  4. Saving and restoring folds
  5. Folding by indent
  6. Folding with markers
  7. Folding by syntax
  8. Folding by expression
  9. Folding unchanged lines
  10. Which fold method to use?

29. Moving through programs

  1. Using tags
  2. The preview window
  3. Moving through a program
  4. Finding global identifiers
  5. Finding local identifiers

30. Editing programs

  1. Compiling
  2. Indenting C files
  3. Automatic indenting
  4. Other indenting
  5. Tabs and spaces
  6. Formatting comments

31. Exploiting the GUI

  1. The file browser
  2. Confirmation
  3. Menu shortcuts
  4. Vim window position and size
  5. Various

32. The undo tree

  1. Undo up to a file write
  2. Numbering changes
  3. Jumping around the tree
  4. Time travelling

Tuning Vim

Make Vim work as you like it.

40. Make new commands

  1. Key mapping
  2. Defining command-line commands
  3. Autocommands

41. Write a Vim script

  1. Introduction
  2. Variables
  3. Expressions
  4. Conditionals
  5. Executing an expression
  6. Using functions
  7. Defining a function
  8. Lists and Dictionaries
  9. Exceptions
  10. Various remarks
  11. Writing a plugin
  12. Writing a filetype plugin
  13. Writing a compiler plugin
  14. Writing a plugin that loads quickly
  15. Writing library scripts
  16. Distributing Vim scripts

42. Add new menus

  1. Introduction
  2. Menu commands
  3. Various
  4. Toolbar and popup menus

43. Using filetypes

  1. Plugins for a filetype
  2. Adding a filetype

44. Your own syntax highlighted

  1. Basic syntax commands
  2. Keywords
  3. Matches
  4. Regions
  5. Nested items
  6. Following groups
  7. Other arguments
  8. Clusters
  9. Including another syntax file
  10. Synchronizing
  11. Installing a syntax file
  12. Portable syntax file layout

45. Select your language

  1. Language for Messages
  2. Language for Menus
  3. Using another encoding
  4. Editing files with a different encoding
  5. Entering language text

Making Vim Run

Before you can use Vim.

90. Installing Vim

  1. Unix
  2. MS-Windows
  3. Upgrading
  4. Common installation issues
  5. Uninstalling Vim