https://github.com/karshprime/only-tmux.nvim
have a keybind in nvim for :only that also works for tmux panes
https://github.com/karshprime/only-tmux.nvim
nvim nvim-plugin tmux
Last synced: 10 months ago
JSON representation
have a keybind in nvim for :only that also works for tmux panes
- Host: GitHub
- URL: https://github.com/karshprime/only-tmux.nvim
- Owner: karshPrime
- License: apache-2.0
- Created: 2024-04-14T07:50:53.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T11:42:43.000Z (about 2 years ago)
- Last Synced: 2025-04-01T09:36:04.924Z (over 1 year ago)
- Topics: nvim, nvim-plugin, tmux
- Language: Lua
- Homepage:
- Size: 129 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# only-tmux.nvim
## Description
You probably use
[vim-tmux-navigator](https://github.com/christoomey/vim-tmux-navigator) and
wonder if you could further blur the line between tmux and nvim panes. With this
plugin you could by extending the use of `:only` to minimise/close tmux panes on
your current window as well.
With a keybind you'll minimise all unfocused nvim panes to buffer and either
move all other tmux panes to new window or simply delete them (or just config
different keys for different actions).

## Installation and Setup
Install using your favorite plugin manager. For example, using
[lazy.nvim](https://github.com/folke/lazy.nvim):
```lua
{ 'karshPrime/only-tmux.nvim',
event = 'VeryLazy',
config = { new_window_name = "session" } -- optional
},
```
## Keybinds
```lua
-- move nvim panes to buffer and close unfocused tmux panes
vim.keymap.set('n', 'o', ':TMUXonly close', { silent = true })
-- move nvim panes to buffer and move unfocused tmux panes to new window
vim.keymap.set('n', 'O', ':TMUXonly move', { silent = true })
```