This Neovim "Plugin" Replaces 40 Others


This Neovim "Plugin" Replaces 40 Others

You know the feeling of finding a new improvement to your setup that you KNOW is going to change it completely?

"Imagine living your entire life carrying heavy loads on your back dragging things through the road thinking: `well that's just how it is`"
- Homo sapiens, before the invention of the wheel

That's exactly what coding without mini.nvim feels like once you've experienced its power, especially if you're Neovim setup was closer to vanilla.

Most Neovim users spend years curating their perfect setup (I know I did), carefully selecting plugins for each specific need - text objects, surround functionality, file management, motions and more.

It's a meticulous process of finding, configuring, and maintaining dozens of different plugins. Then getting used to the new system (or not), and going back through the same loop.

While this approach works, it creates a fragile ecosystem where updates can break things, plugins conflict with each other, and your config files grow increasingly complex, and, sometimes extremely bloated for no good reason.

Mini.nvim is different

Instead of collecting various plugins from different authors with different philosophies, it provides a cohesive suite of tools that work seamlessly together - while many frameworks and tools claim to do just that, with mini.nvim this is 100% the case. It's text objects play nice with motions and functionality introduced by all other plugins within its library (mini.operators is one great example).

Its AI module (no, not THAT AI; but "around/inside" text objects) introduces intuitive motions that let you manipulate code with unprecedented precision. Want to change everything inside the next quote? vinq ("visual selection inside next quotes"), gets you there.

Need to swap two function parameters?

The exchange operator gx makes it trivial, hit your source word with `gxiw` and then again on your target word for replacement (or, even better - use the dot operator to repeat the last action - something applied with all mini plugins!), and just like that - the words will exchange places. I can't tell you how much I've been using this one motion ever since coming across mini on a vimconf talk by its creator.

The surround module integrates perfectly with these text objects, (and replaces yet another tpope plugin), while mini-files gives you a powerful file manager that feels like it was always part of Neovim.

To get started with mini.nvim, begin with its core modules: mini-ai for text objects, mini-surround for wrapping text, mini-bracketed for improved bracket based motions, and mini-files for file management. Install them through your favorite package manager (Lazy works great), and gradually explore its other capabilities as you get comfortable.

Don't feel pressured to use all 40+ modules at once - the beauty of mini.nvim is that each piece works perfectly fine on its own, while unlocking extra power when used together. Your coding workflow will thank you.


One cool project I came across with recently:


Thank you for reading! Feel free to reply directly with any question or feedback.
Have a great weekend!

ESPRESSO FRIDAYS

Every once in a while I send hand picked things I've learned. Kind of like your filter to the tech internet. No spam, I promise!

Read more from ESPRESSO FRIDAYS

I Was DEFINITELY Using The Wrong VPS Setup When was the last time you thought up running something on a server? It doesn't have to be something fancy. A side project. A utility. An open source that you always wanted to run on your own but just too lazy to get it off the ground so you. I certainly have. Even when I needed a local server, my immediate thought was "sure, I can just setup and K8s cluster on my raspberry pie an put whatever I want there" 🤦 After years of advocating for complex...

Run Code Anywhere: A Modern Guide to Docker Imagine a world where your code runs flawlessly across any environment – from your laptop to production servers – without the dreaded "but it works on my machine" syndrome. That's the promise of containers, and they've revolutionized how we develop, test, and deploy applications. Containers emerged as a solution to the chaos of maintaining traditional servers, where applications would conflict with each other and overwrite data. Using Linux...

Stop Using Redis. Use Open Source Instead. This issue is brought to you by: Level Up Your Security Skills With Snyk! Join security expert John Hammond for Fetch the Flag CTF - a 12-hour capture-the-flag event hosted by Snyk. Level up your security skills and compete for awesome prizes. Register now here! Redis, the cache system and in-memory DB we all love, started as a small passion project by an Italian developer name Salvatore Sanfilippo. Since it was open source and free to use, a small...