Barbarian Meets Coding
barbarianmeetscoding

WebDev, UX & a Pinch of Fantasy

6 minutes readwizardsusevim

The Wizard Logs - Part II - The Adventures, Glory and Misfortunes of Writing Wizards Use Vim

Hello! I’m back two weeks and two days after the last update on Wizards Use Vim. I’ve written, reviewed, sketched and drawn a lot throughout the past weeks, improving the front-cover, nearly doubling the number of pages in the book from ~120 to ~220 and publishing about 40 new versions (between 2-4 per day). Wiiihooo!

What are the most significant updates in the book?

  • The first part of the book (The introductory chapters and The Path of the Apprentice) is now quite solid and in proposal stage. I think its contents are going to be very similar to the final version of the book. Here goes an excerpt from the intro to the book. I think it’s pretty strong. :D
Introduction to Wizards Use Vim
  • I have added a bunch of code samples and small exercises throughout the first chapters to help illustrate and strengthen concepts. I’m hoping they are fun (and funny) and will work to make them even more so. Here’s a sample exercise:
Wizards Use Vim sample exercise
  • After that I’ve focused in pumping out a lot of content with not so much regard for style and details. I’ve completed part of the Path of the Master up until the chapter about the command-line mode.
  • I have rearranged part of the book moving more advanced stuff to the Path of the Grandmaster and changing the order of some chapters to provide a more sensible learning experience.
  • I did some new drawings, improved the front cover (still very much WIP though) and also learned a lot using Procreate, the tool that I use for painting. So I expect to be more efficient and produce better art in the future. Here’s some of them:
New Cover of Wizards Use VimCan't exit Vim

I refined the coloring, lighting, emerald, background, experimented with different leather colors. I also made Vim metallic as the original logo but now the piece feels less harmonic than before. I need to reconsider and experiment.

Vim's core motions hjkl

Yey! I have improved the calligraphy, both in the main art and in the scripted comments. Wiho!

Some Cool Ideas

I’ve done a major change in the book. Something that has been nagging at me from the very beginning but which I had just stuffed in a dark corner of my brain.

A month or so ago, while I was planning the book, I decided to have all Vim configuration as an advanced part of using Vim and thus I relegated it to the end of the book. But the more I wrote, the more I realized that the best thing was to have the reader slowly improving their Vim experience by customizing Vim as they learn. As thus, we now have a little bit of customization awesomeness throughout the whole book. Here’s another excerpt from the Getting Started with Vim chapter where the reader setups Vim:

How To Create Your Own Key Mappings in Vim

I’ve lain awake for many nights, more than I’d like to admit, over whether to put this section here or at the end of the book. But this is such a game changer in Vim, that I will take the risk of giving you too much information, too early and I’ll confide in that you are up for a challenge. I believe in you!

If there’s one thing that you’ll find super useful early on is learning how to configure your own key mappings. That is, to customize Vim to perform actions using key mappings (key combinations) of your own devise. This will not only affect how effective you’re at using Vim on a day to day basis, but it will also make you increasingly comfortable with configuring Vim which is one of Vim’s core strengths.

All My Recommendations Are Optional

You are more than welcome to read my recommendations and answer with a resounding “NO Jaime! I don’t think that’s a good idea.”. You can pick and choose the ones that you think are worthy and leave the rest. And if you want to wait before customizing Vim, and only want to rely on the defaults for the time being, that is totally OK as well.

In this early section of the book we won’t dive in deep right away. I’ll just give you the simplest recipe for creating mappings and we’ll leave the meaty part for the end of the book when you’ve become a more experienced Vim wizard.

In order to create a custom mapping in Vim you add the following in your vimrc file:

noremap {new-keys} {vim-commands-to-execute}

To the left you have the new keys that define your new mapping, and to the right you have the default vim keys or commands that will be executed whenever you use your mapping.

Let’s create our first custom mapping to warm up. Open Vim and type the following:

:noremap h :echo "Hello Mappings!"<CR>

Now try typing the h key. What happens? Yes, you can no longer use h to move the cursor to the left. Instead the message Hello Mappings! is shown in the command-line area.

Excellent! You’ve created your first mapping! We’ll be making use of this in each chapter. As you go learning about Vim, you will slowly start customizing it and becoming more awesome.

etc… etc…

I’ve also been experimenting with a web-based version of Wizards Use Vim. More on that, in a not too distant future.

Some Concerns That I Have

A big concern that I have right now is the size of the book. My goal with the book was to write an introductory book to Vim, something that would be small and approachable. But now I find myself with a ~200 pages book and this concerns me greatly. I don’t want to write a Mastodon of a book. Both because it can be intimidating, and because it is a immense amount of work.

I think that the approach I’m going to follow right now is to just write all the stuff I want to write as a brain dump. And then I’ll tighten it up. I have an inkling that the last part of the book, The Path of the Grandmaster is going to have much less depth that the initial parts (which give you a good foundation and are filled with step by step examples and thorough explanations which naturally take more pages). We’ll see.

Random Pieces of Advice and Thoughts

I started using my iPad to review the book with iBooks and the Apple pen and I’m mindblown by how nice an experience this is. First, seeing the book as a book is very rewarding. Second, taking notes, circling stuff, doodling, is a freaking joy:

Reviewing Wizards Use Vim on the iPad

Procreate is a really awesome drawing tool but some of the features are quite hidden. They totally make sense once you’ve learned about them but up until then you wonder: Why is undoing so hard? How do I group layers? etc…

If you are using procreate and have had the same thoughts, here goes a great video with tips shared by @sulco:

Their Artist Handbook is also super helpful and gorgeous. (And I like the idea of thinking of myself as an artist just cuz I’m reading it hehe)

And that’s it for now! Hope you’ve enjoyed learning more about what’s going on behind the scenes of Wizards Use Vim. And if you have any feedback, please feel free to leave me a tweet or a DM!

P.S. Huge thanks and appreciation to @Faluk for his kind words and support which have given me lots more energy to continue writing and doing an awesome job of it. If you have words of appreciation for someone else’s work, give them freely, people really appreciate them.


Jaime González García

Written by Jaime González García , dad, husband, software engineer, ux designer, amateur pixel artist, tinkerer and master of the arcane arts. You can also find him on Twitter jabbering about random stuff.Jaime González García