Skip to content

Quickly access a tmux window without leaving neovim

Notifications You must be signed in to change notification settings

gassayping/tmux-peek.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

tmux-peek.nvim

Get a view into a tmux window without leaving neovim. Useful for referencing your code as you read errors. Inspired by tj's floaterminal in advent-of-nvim

Usage

:TmuxPeek opens a floating window with the leftmost tmux window opened.

tmux-peek.nvim uses terminal mode. When in terminal mode, use <C-\><C-N> to exit insert mode. Use :h terminal for more information on terminal mode.

⚠️ Using tmux-peek.nvim to open the same tmux window that neovim is open in will cause resizing issues

Installation

For lazy.nvim

{
    "gassayping/tmux-peek.nvim",
    opts = {}
}

:TmuxPeek will automatically be made available

Configuration

These are the default configuration options

require("tmux-peek").setup({
    session_prefix = "peek-",
    win_config = {
        width = 0.5,
        height = 0.3,
        col = 0.5,
        row = 0.9,
        relative = "editor",
        border = "rounded",
        style = "minimal",
        title = "Tmux Peek",
        title_pos = "center"
    }
})

It is recommended to add a keymap to easily toggle the floating tmux window

vim.keymap.set({ "n", "t" }, "<leader>tp", "<cmd>TmuxPeek<CR>", { desc = "Toggle floating tmux window" })

About

Quickly access a tmux window without leaving neovim

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages