Learn Vimscript the Hard Way (original) (raw)
Learn Vimscript the Hard Way is a book for users of the Vim editor who want to learn how to customize Vim.
It is not a guide to using Vim. Before reading this book you should be comfortable editing text in Vim and know what terms like "buffer", "window" and "insert mode" mean.
The book is divided roughly into three sections:
- The first covers basic Vim commands that you can use in your
~/.vimrc
file to customize Vim quickly and easily. - The second looks more deeply at Vimscript as a programming language, covering things like variables, comparisons, and functions.
- The third walks through the creation of a sample plugin intended for distribution to other Vim users.
The book is copyright 2013 by Steve Losh, all rights reserved. You can redistribute this HTML version as long as you don't make any changes and don't charge for it.
The book will always be free to read online.
You can buy an ebook (PDF, epub, mobi) version for $8 on Leanpub.
You can buy a paperback copy for $20 on Lulu.
You can buy a hardcover copy for $40 on Lulu.
Table of Contents
- Preface
- Acknowledgements
- Prerequisites
- Echoing Messages
- Setting Options
- Basic Mapping
- Modal Mapping
- Strict Mapping
- Leaders
- Editing Your Vimrc
- Abbreviations
- More Mappings
- Training Your Fingers
- Buffer-Local Options and Mappings
- Autocommands
- Buffer-Local Abbreviations
- Autocommand Groups
- Operator-Pending Mappings
- More Operator-Pending Mappings
- Status Lines
- Responsible Coding
- Variables
- Variable Scoping
- Conditionals
- Comparisons
- Functions
- Function Arguments
- Numbers
- Strings
- String Functions
- Execute
- Normal
- Execute Normal!
- Basic Regular Expressions
- Case Study: Grep Operator, Part One
- Case Study: Grep Operator, Part Two
- Case Study: Grep Operator, Part Three
- Lists
- Looping
- Dictionaries
- Toggling
- Functional Programming
- Paths
- Creating a Full Plugin
- Plugin Layout in the Dark Ages
- A New Hope: Plugin Layout with Pathogen
- Detecting Filetypes
- Basic Syntax Highlighting
- Advanced Syntax Highlighting
- Even More Advanced Syntax Highlighting
- Basic Folding
- Advanced Folding
- Section Movement Theory
- Potion Section Movement
- External Commands
- Autoloading
- Documentation
- Distribution
- What Now?