Getting Started with LazyVim and Tmux
A guide to setting up a modern terminal-based development environment with Neovim (LazyVim) and Tmux — from installation to configuration.
If you've ever been frustrated by slow IDE startup times, heavy RAM usage from Electron-based editors, or the inability to code efficiently over SSH — a terminal-based setup might be what you need. I switched to LazyVim + Tmux a while ago and it transformed my workflow: instant startup, full keyboard-driven navigation, and persistent sessions that survive disconnects.
Here's how to set it up from scratch.
What is Vim?
Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as "vi" with most UNIX systems and with macOS.
What is LazyVim?
LazyVim is a Neovim setup powered by 💤 lazy.nvim that makes it easy to customize and extend your config. It comes with sensible defaults, a beautiful UI, and a rich plugin ecosystem out of the box.
What is Tmux?
Tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background), and reattach them to a different terminal.
Installation
Install Neovim
Neovim is a modern fork of Vim with better extensibility and Lua-based configuration. It maintains compatibility with Vim features where possible.
On Linux:
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo rm -rf /opt/nvim-linux-x86_64
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
Add to ~/.bashrc:
export PATH="$PATH:/opt/nvim-linux-x86_64/bin"
Verify the installation:
nvim --version
# Output
# NVIM v0.11.4
# Build type: Release
# LuaJIT 2.1.1741730670
Install LazyVim
First, back up your existing Neovim config:
# Required
mv ~/.config/nvim{,.bak}
# Optional but recommended
mv ~/.local/share/nvim{,.bak}
mv ~/.local/state/nvim{,.bak}
mv ~/.cache/nvim{,.bak}
Clone the LazyVim starter template:
git clone https://github.com/LazyVim/starter ~/.config/nvim
rm -rf ~/.config/nvim/.git
Start Neovim and wait for LazyVim to finish the setup:
nvim
Install Tmux
On Debian/Ubuntu:
sudo apt install -y tmux
Tmux Plugin Manager (Optional)
Customize your Tmux with plugins. This step is optional — skip it if you don't need plugins.
👉 Install Tmux Plugin Manager (TPM)
Here's my Tmux config. You can copy it to ~/.tmux.conf or use it as a reference. See tmux-plugins list for more plugins.
# .tmux.conf
set -g default-terminal 'screen-256color'
set -g status-style 'bg=#1e1e2e'
# Vim-style pane navigation
setw -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Pane resizing
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r H resize-pane -L 5
bind -r L resize-pane -R 5
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Dracula theme
set -g @plugin 'dracula/tmux'
set -g @dracula-show-powerline true
set -g @dracula-show-flags true
set -g @dracula-show-left-icon session
set -g @dracula-cpu-display-load true
set -g @dracula-plugins "cpu-usage ram-usage"
set -g @dracula-cpu-usage-colors "pink dark_gray"
set -g @dracula-refresh-rate 5
set -g @dracula-border-contrast true
set -g @dracula-transparent-powerline-bg true
set -g @dracula-left-icon-padding 0
set -g @dracula-show-battery-status true
set -g @dracula-time-format "%F %R"
set -g status-position top
# Neovim + Tmux navigation
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @vim_navigator_mapping_left "C-Left C-h"
set -g @vim_navigator_mapping_right "C-Right C-l"
set -g @vim_navigator_mapping_up "C-k"
set -g @vim_navigator_mapping_down "C-j"
set -g @vim_navigator_mapping_prev ""
# Additional plugins
set -g @plugin 'laktak/extrakto'
set -g @plugin 'rickstaa/tmux-notify'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'AngryMorrocoy/tmux-neolazygit'
# Initialize TPM (keep this line at the very bottom)
run '~/.tmux/plugins/tpm/tpm'
Using Tmux
Start a Tmux session:
tmux
Managing plugins (using the default Ctrl+b prefix):
Ctrl+b→Shift+I— Install pluginsCtrl+b→Shift+U— Update all plugins
Tip: You can remap the prefix key if you prefer
Ctrl+a:# ~/.tmux.confunbind C-bset-option -g prefix C-abind-key C-a send-prefix
Keymaps and Plugins
LazyVim comes with a rich set of default keybindings and pre-configured plugins:
- 📋 LazyVim Keymaps — browse all default key bindings
- 🔌 LazyVim Plugins — see the full list of included plugins
Integrating Neovim with Tmux
To navigate seamlessly between Neovim splits and Tmux panes, add this plugin to your Neovim config:
-- ~/.config/nvim/lua/plugins/tmux-navigator.lua
return {
{
"christoomey/vim-tmux-navigator",
cmd = {
"TmuxNavigateLeft",
"TmuxNavigateDown",
"TmuxNavigateUp",
"TmuxNavigateRight",
"TmuxNavigatePrevious",
"TmuxNavigatorProcessList",
},
keys = {
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
},
},
}
Then open Neovim and sync the plugins:
nvim
# Press: l → Shift+U → Shift+S
Why I Choose LazyVim and Tmux
- Speed — Everything runs in the terminal. No heavy IDE, no Electron overhead.
- Customization — LazyVim's Lua-based config makes it easy to add exactly the plugins and keymaps you need.
- Persistent sessions — Tmux lets you detach and reattach sessions, so your workspace survives SSH disconnects and reboots.
- Seamless navigation — With
vim-tmux-navigator, you can move between Neovim splits and Tmux panes using the same keybindings. - Portable — Your entire setup is a few config files you can sync across machines with a dotfiles repo.
Thanks for reading! If you're setting up a new dev environment, check out my Things to Do After Installing Ubuntu post as well. 🚀