112 points thanato0s 15 hours ago 32 comments
When I started using Vim more than a decade ago, I wished there was a manual out there teaching how to use this fantastic editor step by step, beginning with the foundations up to more advanced features. Of course at the time I did the vimtutor, but it was too dense for me to remember much from it. I also read the entire Vim manual (`:help manual`), but I didn't like it: it was too detailed in places (for example `02.8 Finding help` completely lost me for a while), and other features didn't get the treatment they deserved.
So I decided to write my own Vim manual. It took me more than 4 years and 2987 focused pomodoros (1244 hours) of work to finally get it done!
The result:
- 21 chapters showing the most important Vim features step by step.
- 170 exercises with solutions.
- Many real-life examples to show how Vim can be used and configured for your own needs.
- The related Vim's help pages to dig further into each feature.
Most configs are both written in Vimscript and Lua for Neovim users. This book explores the common features between Vim and Neovim, so don't expect anything about Neovim-specific features (like treesitter or LSP for example).
- The landing page: https://themouseless.dev/vim/
- A sample of the book with the entire table of contents and the first three chapters covering most of the basics: https://themouseless.dev/content/learning_to_play_vim_sample....
I wrote this with my bare hands, no LLM involved to spoil the fun.
aktenlage 9 hours ago | parent
As a motivation for new vim users, I'd like to mention that LLMs make it even more awesome to use such a malleable editor. When I think of some functionality I need, I'll just let Copilot write a small function and key binding and voila, it's done. It's pretty good at vimscript.
Latest example: a key (gK) to show the full git commit message of the current line. Or, when used with a number (e.g. 4gK) the message of the nth previous commit touching that line.
thanato0s 9 hours ago | parent
negura 3 hours ago | parent
N_Lens 2 hours ago | parent
codesnik 2 hours ago | parent
thanato0s 10 minutes ago | parent
Even before LLMs was all what mattered I couldn't really use bloated external config, because without understanding what is what I can't really know what I need and how to add it...
I like simplicity and controlling my tool, that's maybe why.
pullshark91 9 hours ago | parent
thanato0s 9 hours ago | parent
Vim always ended up frozen on me when opening big XML files, one big verbose line each. Just had to delete my tmux session though, not restart everything.
alpaca128 6 hours ago | parent
thanato0s 5 hours ago | parent
smashandgrab 9 hours ago | parent
Unfortunately the tools used by incident responders are mostly built in GUIs and tabbing through everything is less productive than just reaching for the mouse.
I don’t hate you, mouse. I just have a dream.
thanato0s 9 hours ago | parent
Fire-Dragon-DoL 3 hours ago | parent
harry8 1 hour ago | parent
I found the inspiration hilarious, don't miss it even if this window manager is not for you.
vinyl7 1 hour ago | parent
kinfish 8 hours ago | parent
thanato0s 8 hours ago | parent
I wrote a lot of stuff in my blog before that, and another book. It's just what I like to spend my morning before work; playing with Markdown, latex, Lua, the shell, and write stuff.
leowoo91 7 hours ago | parent
thanato0s 7 hours ago | parent
I guess I'll write about all of that soon, but I think it's important nowadays to own our stuff, without necessarily leaking everything to the data brokers. I like local plain text for that; I just don't depend on anything. It's easy to share too, and format like Markdown can be rendered easily.
Also I like spending my time in the terminal, don't ask me why.
HAL9500TURBO 4 hours ago | parent
Since the efforts of putting vim everywhere are always welcome, I will give some random opinions about it here:
1. The best way of teaching it would probably be a gamified version, not sure if anyone did this yet. People have really low attention spans nowadays. Unless I'm reading a novel or something like that, I will throw text into an LLM to get a summary anyway, even if I feel a bit bad about it (it's just more efficient).
2. Personally I've always referenced people to Luke Smith's (otherwise known as "Vim Diesel") video on vim for beginners to learn most of the useful commands.
thanato0s 4 hours ago | parent
I don't think LLMs are the best to generate consistency at the scale of a book. To me it's just a choice between reading human's writing and reading hundred of pages where there is no intention... and maybe full of bullshits. At least my bullshits are due to human error :D
But I mean I don't want this whole thread to be about LLM. It's just about Vim, a cool text editor in the shell.
For the gamified version there is the great https://www.vimgolf.com/, and there is also Vim adventures
EDIT: Also there is the famous snake game where hjkl are the arrow keys: https://themouseless.dev/snake/
funny enough I wanted to develop a game at one point in Clojure to learn Vim, but I never really finished it. Maybe I should do that.
Oh and here's a wayback machine from 2021: https://web.archive.org/web/20211002194931/https://themousel...
robenheimer 5 hours ago | parent
thanato0s 4 hours ago | parent
I mean it's not perfect by any mean but it has so many good ideas. It has some heart I'd say.
and yeah Vim is not an OS ;)
bitfilped 2 hours ago | parent
_def 5 hours ago | parent
thanato0s 5 hours ago | parent
nickandbro 4 hours ago | parent
thanato0s 4 hours ago | parent
Never been a fan of Vim in the browser, sorry :D I like the real thing in the shell.
nickandbro 43 minutes ago | parent
sschmitt 40 minutes ago | parent
Insanity 23 minutes ago | parent
I’ve been daily driving vim for about 15 years now so don’t think it’s something for me, but it’s good to see new content being created for the next generation software engineers (although they might only see prompt interfaces 99% of the time).