r/commandline • • 22h ago

Guide It took me 5 years to write a Vim manual

122 Upvotes

I'm happy to announce the release of my new book, Learning to Play Vim! It's a book about using Vim in the terminal, so I thought it could interest some folks around here.

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 losts me for weeks), and not enough for other features.

So I decided to write my own Vim manual. It took me 5 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 config 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).

Some links:

  • A sample of the book with the entire table of contents and the first three chapters (the first 74 pages plus the preface).
  • The landing page if you want more information.

I like writing as it turns out; so no LLM involved to take away the fun.

I'm happy to answer questions or take feedback (positive or negative).


r/commandline • • 13h ago

Command Line Interface P2P HTTPS to localhost forwarder in one command (virunx)

0 Upvotes

I built a one-command tool that puts a local port behind a public HTTPS URL:

npx virunx -p 3000 -s test
=> https://test.run.vishota.com (-s is optional)

Requests arriving at that URL (HTTP(S), WebSockets, SSE) are forwarded to your localhost:3000. Two key points of this solution:
- peer-to-peer as the main way to connect + relay-proxy as an emergency fallback;
- one command to make it work: no auth, all the settings are CLI args.

Main page of the project: https://run.vishota.com/ (free until I stop hosting it)

Use cases I see here:
- opening a dev project from another device;
- showing a project to a friend;
- testing HTTPS-only behavior: Secure cookies, OAuth redirects, camera/geolocation, mixed content;
- putting up a demo for some conference or meeting.
You can use it for more production-related things, but keep in mind that the more relay traffic you burn, the lower your priority in traffic distribution is.
P2P-first architecture is my way to make it actually free at any scale: in p2p mode the server does mostly signaling, and that's pretty cheap on the relay server side.

Built it for myself first, then decided to publish.

What I haven't done yet:
- stress testing (can p2p still work while the proxy is overloaded?);
- disabling relay-side proxying entirely (relay mode: if it works, congratulations, if not — you should try something else; note: in some network configs p2p connection is not possible at all);
- moving the tunnel service to a separate domain to protect my main domain's reputation (the tunnel endpoint can be abused).

I've been already using it for some cases like using my old galaxy a55 behind NAT as a VPS, also I've built it in my other project, agentic coding kanban board (will post about it another time, i guess), as a remote access feature basis, virunx worked pretty well for these cases.

I won't bore you with the deeper technical details here — you can dig in via the links below.

npm: https://www.npmjs.com/package/virunx

Main page: https://run.vishota.com

Any feedback welcome!

Note: code of this utility has been written with an AI assistance