Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

tmux-nav.nvim

Seamless navigation and resizing between tmux panes and Neovim splits using the same keybindings. A plugin designed to enhance the tmux + Neovim workflow.

Features

  • Navigate between Neovim splits and tmux panes with <C-h>, <C-j>, <C-k>, <C-l>
  • Resize Neovim windows and tmux panes with <M-h>, <M-j>, <M-k>, <M-l> (optional)
  • Works in all modes (normal, insert, visual, select)
  • Intelligent edge detection - automatically switches to tmux pane when at window edge
  • Fully configurable keybindings and modes

Installation

Using lazy.nvim:

{
  "Huijiro/tmux-nav.nvim",
  config = function()
    require("tmux-nav").setup()
  end
}

Configuration

Default configuration:

require("tmux-nav").setup({
  switch_window = {
    enabled = true,
    modes = { "n", "i", "v", "x", "s" },
    keybinds = {
      { "<c-h>", "h" },
      { "<c-j>", "j" },
      { "<c-k>", "k" },
      { "<c-l>", "l" },
    },
  },
  resize = {
    enabled = false, -- Set to true to enable resizing
    modes = { "n" },
    amount = 2,
    keybinds = {
      { "<m-h>", "h" },
      { "<m-j>", "j" },
      { "<m-k>", "k" },
      { "<m-l>", "l" },
    },
  },
})

Example with custom keybindings

require("tmux-nav").setup({
  switch_window = {
    keybinds = {
      { "<leader>h", "h" },
      { "<leader>j", "j" },
      { "<leader>k", "k" },
      { "<leader>l", "l" },
    },
  },
  resize = {
    enabled = true,
    amount = 5,
  },
})

Disable window switching

require("tmux-nav").setup({
  switch_window = {
    enabled = false,
  },
})

Requirements

  • Neovim >= 0.7
  • tmux

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages