
How I Got Started With Neovim and Tmux
After years of using VS Code with its integrated terminal, I made the switch to Neovim and tmux. This article shares my journey, the challenges I faced, and why I'm sticking with this powerful combo.
Why I Wanted to Switch
My motivation for learning Neovim and tmux came from several directions:
- Efficiency seeking: I wanted to be more productive in my coding workflow
- Terminal curiosity: Wanted to use the terminal more and understand it better
- Developer inspiration: Saw respected developers like Prime, Teej, DHH, and some of my colleagues using and advocating for Neovim
- Microsoft concerns: Not a huge fan of their recent decisions, would rather not rely on their products
My Neovim Journey
The False Start
Switching to Neovim was something I thought about for a long time before actually taking the leap. Watching Primeagen and Teej DeVries code in their matrix-like environment seemed so satisfying and efficient. I wanted that same experience.
When I first dual-booted with Linux (using Omakub), it came with preconfigured Neovim. I tried it for a couple of days but got frustrated with being so slow and constantly looking up vim keybindings. I retreated back to VS Code.
The Real Commitment
It wasn't until my second Linux installation with Hyprland, where neither VS Code nor Neovim was pre-installed, that I decided to force myself to learn Neovim for real. I:
- Binge-watched tutorials and configuration videos
- Read countless articles about Neovim
- Truly immersed myself in understanding the basics before even installing it
- Followed the common recommendation and installed Neovim with Kickstart
- Read through the manual (being a well commented init.lua file), trying every keybind to get a feel for it all
I continued like this for about a week until I felt comfortable enough to start tweaking the setup. After all, Neovim is all about molding the editor to your preferences and workflows.
Building My Setup
I found a helpful video that explained advanced concepts at a suitable pace with clear explanations. Using that as a guide, I wrote my own nvim configuration, installed useful plugins, and made sure I understood how they worked.
Since I write a bunch of Laravel code in my free time, I discovered that getting a decent Laravel setup in Neovim requires quite a bit of configuration. Fortunately, I found Jess Archer's great course on Laracasts about configuring Neovim for Laravel. This expanded my knowledge and gave me nice additions on top of the Laravel setup. Though the course is somewhat outdated, Jess maintains an open-source dotfiles repo with up-to-date configurations.
I'm now quite happy with my Neovim setup, though some issues remain. Blade files are still a pain to get working as intended, and without a Laravel-specific language server, I probably can't configure it to match VS Code or PhpStorm for Laravel development. However, for JavaScript or TypeScript projects, the editor experience feels excellent.
Adding Tmux to the Mix
The Missing Integration
Coming from VS Code with its integrated terminal, I missed that same "integrated" feel in Neovim. For the first few weeks, I used a secondary terminal for running local servers or other development commands, but it didn't feel right.
I had heard about the infamous Neovim + tmux combo from the internet and colleagues, but didn't fully understand why until I realized it could provide that integrated experience I was looking for.
Learning and Configuring
I approached tmux the same way I did Neovim:
- Researched extensively
- Installed it
- Configured it to my preferences
Now I've built enough muscle memory around both tools that I don't have to think much about how to do what I need. I've integrated custom scripts to automate common tasks like:
- Switching between projects
- Opening pre-configured tmux panels when opening different projects
- Fuzzy finding all repos with a simple tmux keybinding
Advice for Neovim and Tmux Beginners
Everyone learns tools differently, but here's what worked for me:
- Find your motivation: I put off learning Neovim for years because I hadn't built a strong enough case for myself. Once I realized the life-long benefits, I could push through the growing pains.
- Research thoroughly: Not just how the tools work generally, but the different ways to configure them. You'll find little things that make the tools just right for you.
- Invest in proper learning: Understanding how Neovim and tmux are configured and what each configuration line does makes you comfortable with tweaking, adding plugins, or modifying functionality.
After this journey, I don't see myself going back to VS Code or other editors anytime soon. The terminal has won me over. Maybe this is just a phase, or maybe it's a life-long path. Only time will tell.