I’m Never Using Neovim’s Terminal the Same Again


Hi friends,

I have a (yet another) workflow problem

Managing the terminal and Neovim efficiently can be confusing. Is Neovim a terminal app, or is the terminal a Neovim process? There are too many options: multiplexing, terminal commands, and various plugins.

How Most People Solve It

Most developers tend to fire up another GUI window for their terminal. The more “advanced” use a terminal tab, completely unaware of Neovim’s internal emulator they can start with :terminal.

Why It Doesn’t Work for Them

Those familiar with the internal emulator often get frustrated after the first use!
Neovim’s terminal can be cumbersome (to say the least) to switch in and out of, requiring additional configuration and management, which can disrupt workflow continuity.

To step out of the internal emulator to an external pane, you'd have to use the non-straightforward Ctrl-\ Ctrl-N.

Instead of fighting the default mappings, I added a few to improve my internal emulator flow:

Remap Ctrl-\ Ctrl-N to Esc for easier mode switching without closing the terminal by forcing the process to close with the pane together:

tnoremap

This, however, is only one step in the right direction, let's imrprove it further to seamlessly integrate the internal emulator as if it was just another Neovim split:

Add terminal mode mappings to switch in and out of the emulator’s pane:

:tnoremap
:tnoremap
:tnoremap
:tnoremap

These map terminal mode Alt and one of the vim-arrows to move in the respective direction.

Using the internal emulator is nice, but it still felt like mixing my coding environment with something it shouldn't have.

Floating Terminals

I love floating panes. If you’re a floating pane person, try implementing FlowTerm for floating terminals within Neovim. This allows persistent, toggle-able terminals that overlay your code, ideal for quick tasks. My only issues with FlowTerm are:

  1. It's not visually pleasing, in my opinion.
  2. Tied to the Neovim process; if I restart the session or change to another Tmux pane, there’s no persistence.

Multiplexers for Persistent Sessions

My previous go-to was Tmux for managing long-lived sessions separately from Neovim (any other multiplexing options is valid here). This ensures your terminal sessions remain active, even when you close Neovim. However, this comes with a “price”; using a window split, forces me to go through these steps to access my terminal:

  1. Zoom out of my current context.
  2. Move one pane down.
  3. Zoom into the terminal pane and do my thing.
  4. Zoom back out.
  5. Move one pane up.
  6. Zoom back into my Neovim session.

This, to the “least keystrokes” trained Neovim junkie, is unacceptable. The other obvious option is to use a separate multiplexer window. In Tmux, this makes things quicker—one key binding to jump back and forth to an already fullscreen Neovim/terminal session. But there’s another price to be paid:

  1. Visually changing context makes me feel like I “left” Neovim to run another task, as opposed to a terminal split underneath (or on top).
  2. As someone who heavily uses windows, “occupying” a window spot means I am forced to search harder and toggle between yet another window in my session.

The Solution: A Floating Tmux Pane

Zellij has floating panes. While I love Zellij, I’m still very much a Tmux user, so why not have the same in Tmux? While you can get a Tmux popup, it lacks in many ways:

  • No persistence.
  • Hard to stylize.
  • Super long commands to fire it up.
  • Overall adds huge “friction” to the workflow.

Introducing Tmux-Floax!

A floating Tmux pane with persistence, configurable style, and more. I’ll dive into Floax in a future issue, but for now, here’s how it solves everything I wanted and more:

  • A floating pane with persistence, on top of my Neovim sessions.
  • The ability to split the floating pane and even add internal windows.
  • Full control over size, style, fullscreen, and prefix.
  • No more giving up “window real-estate.”

Out of all the options above, Tmux-Floax seems to be my optimal solution, removing friction, adding joy, and making my workflow 5% better 😎.

I’d really appreciate it if you give Floax a quick ⭐ on GitHub!

Thank you for reading! As always, feel free to reply to this email with thoughts and comments :)

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

LimaVM Is Probably The Best MacOS Virtual Machine I've Ever Used If you're tired of Docker Desktop bogging down your machine, or simply don't like fuff of mapping ports, mounting volumes when all you need is a small virtual environment, this one's for you. I recently discovered LimaVM, and it's a game-changer for local development. It lets you spin up Linux VMs with ease, offering a faster, lighter alternative to Docker and other VM managers for many tasks, but especially for development....

Coding Is Changing. Here's How I Stay AHEAD This issue is brought to you by: Ideas to apps in seconds with Lovable Lovable is your superhuman full stack engineer. Click here for double credits when signing up The AI revolution isn't replacing engineers (IMHO) - it's changing how they work and which skills matter most. I mean, look at the sponsor of this week, a "vibe coding" platform that creates your idea in no time. But, does it actually matter for developers / devops and other tech...

Edit Faster: Vim Motions From Scratch Ever watched a developer frantically switching between keyboard and mouse? "Click, type, click, type..." It's like watching someone crawl when they could just walk. If you're tired of granny mode coding and want to boost your productivity, Vim motions might be exactly what you need. Every once in a while, I review my processes, trying to improve systems, tools, and yes, motions. This time I thought, why not share the basics with everyone too? These...