Stuck in Vim
#programming , #vim , #vue.js
TL;DR: I built http://stuckinvim.com. Use it if you're stuck in Vim. 🙂
It started when I was on a flight from Munich to Vancouver, which is a 10 hour journey. We were probably somewhere above Iceland when I realized that the book I had brought along with me for the flight wasn't something I was going to enjoy reading. And I wasn't convinced by any of the movies offered by the in-flight entertainment. And we still had a good 7-8 hours left. 😒
After a brief moment of being annoyed, it occured to me that just a day ago, StackOverflow had published a blog post where they collected some statistics and concluded that it was pretty difficult for new Vim users to exit Vim. How difficult? So difficult, that at any given point of time, around 80 people are viewing the question How to exit the Vim editor.
Now, I use Vim daily, and even though I'm far from an expert, that number is still mind boggling to me. On the other hand, it kind-of-sort-of makes sense. A few weeks back, I tried to switch to using mutt as my primary email client. Even though I could configure it successfully, I could barely get the hang of it. So it's completely reasonable that that scenario happens for Vim too.
Anyway, back to the plane. After my mind had had some time to process all this, I decided that making a webapp which helps people exit Vim might be a fun little project. The only problem was that I had no internet, so I couldn't really use any external libraries. Or wait, maybe I have dist files somewhere on my laptop from older projects? Turns out, I did. So I copied over the Bootstrap and Vue.js static resources and got to work. After about an hour or so, I had a basic prototype working, which asked you a bunch of questions about what state in Vim you're currently in (modeled as a finite state machine), and then tells you the command you need to type if you want to exit.
The result can be seen here - https://stuckinvim.com 🙂
Since then, I've had some more time to polish this, share it with a few friends and on reddit, and have gotten some good feedback. I open sourced the codebase on Github and have even had some people sending in pull requests!
Anyway, I hope this app is useful. In case you find a bug, or some weird Vim scenario missing, please feel free to either file an issue or even better, open a pull request!