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 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

  1. Preface
  2. Acknowledgements
  3. Prerequisites
  4. Echoing Messages
  5. Setting Options
  6. Basic Mapping
  7. Modal Mapping
  8. Strict Mapping
  9. Leaders
  10. Editing Your Vimrc
  11. Abbreviations
  12. More Mappings
  13. Training Your Fingers
  14. Buffer-Local Options and Mappings
  15. Autocommands
  16. Buffer-Local Abbreviations
  17. Autocommand Groups
  18. Operator-Pending Mappings
  19. More Operator-Pending Mappings
  20. Status Lines
  21. Responsible Coding
  22. Variables
  23. Variable Scoping
  24. Conditionals
  25. Comparisons
  26. Functions
  27. Function Arguments
  28. Numbers
  29. Strings
  30. String Functions
  31. Execute
  32. Normal
  33. Execute Normal!
  34. Basic Regular Expressions
  35. Case Study: Grep Operator, Part One
  36. Case Study: Grep Operator, Part Two
  37. Case Study: Grep Operator, Part Three
  38. Lists
  39. Looping
  40. Dictionaries
  41. Toggling
  42. Functional Programming
  43. Paths
  44. Creating a Full Plugin
  45. Plugin Layout in the Dark Ages
  46. A New Hope: Plugin Layout with Pathogen
  47. Detecting Filetypes
  48. Basic Syntax Highlighting
  49. Advanced Syntax Highlighting
  50. Even More Advanced Syntax Highlighting
  51. Basic Folding
  52. Advanced Folding
  53. Section Movement Theory
  54. Potion Section Movement
  55. External Commands
  56. Autoloading
  57. Documentation
  58. Distribution
  59. What Now?