The Vim editor incorporates a full programming language, with which you can reconfigure just about any aspect of its interface and functionality. This full-day tutorial explores the complete syntax and semantics of that scripting language including:
- Values and variables
- Comments and layout
- Arithmetic and string manipulations
- Conditionals and control structures
- Lists and dictionaries (a.k.a. arrays and hash tables)
- Run-time vs compile-time statements
- Built-in functions
- Accessing and manipulating the editor state
- Issuing editor commands
- User-defined functions
- Scoping of variables and functions
- Object-oriented Vim scripting
- Event-driven Vim scripting
- Exception handling
- Writing Vim plugins and libraries
- Multilingual Vim scripting (using Perl or Python in your scripts)
All the language features are introduced and demonstrated via a series of practical examples including:
- Context-sensitive insert-mode tab completion
- Adaptive navigation of auto-inserted text
- Self-adjusting tabspacing
- Auto-templating of new source code files
- Comment toggling
- List toggling
- On-the-fly spelling correction
- Smart formatting of text
If anything about the way Vim works has ever annoyed or frustrated you, you’ll leave this tutorial with the knowledge and understanding required to fix, augment, replace, simplify, extend, fold, spindle, or mutilate it to your heart’s content.
1-day or 2-day seminar
Anyone with basic programming skills and who is familiar with the basics of the Vim text editor.