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.
Awesome book to build skills on developing plugins for the Vim text editor.
I've been using Vim for around a decade now, accumulating stolen snippets and tentatively writing some little functions to help me work better sometimes, but after reading this book I feel empowered to do more than that.
You don't even need to read all of it to reap benefits -- heck, you can probably learn a lot just cherry-picking chapters (that's how I started, anyway, until I decided to commit to it and restart from beginning). Most chapters are relatively self-contained, which makes reading cover to cover a little bit repetitive but it's a good thing when using as reference.
Besides teaching the Vimscript basics (and gotchas!), the book guides you through building several kinds of useful customizations (mappings, operators, syntax files, culminating in a full-fledged plugin), giving out lots of vim usage tips along the way. It doesn't try to be comprehensive though (it would be too thick!), it leaves a lot of stuff as exercise and for most non-trivial things you'll still need to consult vim's help or Google/Stackoverflow.
I took my time reading this book: whenever I learned something that seemed to make possible some old idea of mine, I'd stop reading and attempt to implement my idea, and more often than not I'd succeed -- thanks to the newly acquired knowledge. Just-in-time learning is awesome! =)
I'll probably use Vim for lots of years ahead, maybe even the rest of my life, so I believe all this learning will keep paying dividends. ;) Recommended for any Vim users that expect to still be using it for the next decade.
Excellent! I've read this at least three times in its free online incarnation. I finally purchased the hardback print-on-demand book for reference and to support the author.
2020 Review: Thanks to this book, I am capable of writing my own Vim plugin. Vimscript actually makes sense in its historical context, but it is so full of pitfalls, a capable guide is invaluable.
I love the approach of this book: it works as a tutorial and as a reference. It's incredibly well structured. If you go through it and do all of the exercises, you WILL be able to write Vimscript and you WILL understand Vim better.
I'm bumping this up to 5/5 stars. I'm not sure why I went with 4/5 previously.
2017 Review: This book is just what I needed to get over the comprehension hurdle when reading and modifying plugins. I'm a huge fan of the Vimwiki plugin and use it daily, but the "diary" feature needs a couple additional shortcuts to be exactly what I need. I now feel capable of adding them myself.
A great introduction to the baroque, deranged and annoyingly useful mess that is scripting and extending Vim. While it doesn't cover all of Vim's dusty corners (which may be beyond all of us aside from Bram Moolenaar and Tim Pope), I certainly picked up a ton of useful concepts/tricks and feel reasonably prepared to dive into others' plugins and start picking apart how they work.
I love technical books that give you real projects and meaningful exercises to do instead of tacking them on as an afterthought, and LVTHW is a great example—you probably won't get much out of this if you don't follow along with them.
Just totally leveled up on my vim/vimscript knowhow.
Enjoyed Steve Losh's writing, except for the constant annoying reminders to *actually do the exercises* -- you can trust me! I actually did them! That was the whole point of me reading this book!
All around, this is a quality book that does a great job of covering Vimscript. Even if you're not planning to write a plugin of your own (the last 3rd of the book), many of the topics covered are extremely practical for the standard Vim user. Furthermore, the author offers the book for free online. I ultimately bought a copy of the eBook for $8 - the least I could do for how helpful the book is.
It would be helpful to have a basic understanding of Vim before delving into the book, and at least one programming language (preferably a scripting language like Bash or Python). But, with those criteria filled, every Vim user should read at least the first two-thirds of this book.
"Learn ____ the Hard Way" is a collection of tech books that take a different approach to teaching. Rather than long explanations with little bits of example code, these books just hit you with big chunks of code and ask you to type it in and play with it. Then it explains it, line-by-line. Some of them also have a "how to break it" section, where you actually practice trying to create errors. It's a great idea that gets people more comfortable with making inevitable mistakes and dealing with error messages.
This is such a book, for Vimscript, the configuration language for the Vim text editor. It did not have a "how to break it" section, or much code, or even much explanation. Mostly it was just cursory, flimsy tutorials on various Vimscript features, with long lists of sections in the help file to read on your own. It felt like the author's heart wasn't really in it. If I wanted to read the poorly-written Vim help files, I wouldn't need this book. So, I didn't read any of that crap, and by the end, I wasn't really typing in the code and playing with it anymore. The author didn't seem to care, and I didn't care much either. I did learn some things from this book, but barely enough to make worth reading.
I have sort of a love hate relationship with this book.
I don't like the writing style at all. I hate that the writer, at times, bullies you into doing the exercises or extra reading. Being a programmer I know the basic building blocks of a programming language. So imo the book starts off rather slow, which surprised me given the title.
After chapter 41 "Creating a Full Plugin" there is a turning point. The potion programming language is introduced and our project is going to be to create a plugin for it. I love that each directory of a plugin is explained and explored. In this part of the book, if you follow along coding, you end up with a complete plugin. It ranges from defining syntax highlighting and custom code folding to autoloading code when it is first needed.
So I now have a vim-potion plugin and have a good understanding of how to create my own. You know what? Goal reached, have another star Steve thanks.