Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/numToStr/Navigator.nvim
:sparkles: Smoothly navigate between neovim and terminal multiplexer(s) :sparkles:
https://github.com/numToStr/Navigator.nvim
lua navigation neovim neovim-plugin nvim plugin tmux wezterm
Last synced: about 1 month ago
JSON representation
:sparkles: Smoothly navigate between neovim and terminal multiplexer(s) :sparkles:
- Host: GitHub
- URL: https://github.com/numToStr/Navigator.nvim
- Owner: numToStr
- License: mit
- Created: 2021-04-03T05:43:19.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-19T22:10:20.000Z (4 months ago)
- Last Synced: 2024-01-24T10:49:47.237Z (4 months ago)
- Topics: lua, navigation, neovim, neovim-plugin, nvim, plugin, tmux, wezterm
- Language: Lua
- Homepage:
- Size: 32.2 KB
- Stars: 354
- Watchers: 4
- Forks: 18
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-neovim - numToStr/Navigator.nvim - Smoothly navigate between Neovim splits and Tmux panes. (Split and Window / Tmux)
- awesome-stars - numToStr/Navigator.nvim - :sparkles: Smoothly navigate between neovim and terminal multiplexer(s) :sparkles: (Lua)
- awesome-stars - Navigator.nvim
- awesome-stars - numToStr/Navigator.nvim - :sparkles: Smoothly navigate between neovim and terminal multiplexer(s) :sparkles: (Lua)
- awesome-stars - numToStr/Navigator.nvim - :sparkles: Smoothly navigate between neovim and terminal multiplexer(s) :sparkles: (Lua)
- awesome-neovim - numToStr/Navigator.nvim - Smoothly navigate between Neovim splits and Tmux panes. (Split and Window / Tmux)
- awesome-neovim - numToStr/Navigator.nvim - Smoothly navigate between Neovim splits and Tmux panes. (Split and Window / Tmux)
README
Navigator.nvim
✨ Smoothly navigate between neovim and multiplexer(s) ✨
![Navigator](https://user-images.githubusercontent.com/24727447/157040356-1f44323a-c7b6-4955-8207-5e6cade08c9e.gif "Navigating to the moon")
`Navigator.nvim` provides set of [functions](#lua-api) and [commands](#commands) that allows you to seamlessly navigate between neovim and different [terminal multiplexers](#multiplexers).
### 🚀 Installation
#### Neovim
- With [packer.nvim](https://github.com/wbthomason/packer.nvim)
```lua
use {
'numToStr/Navigator.nvim',
config = function()
require('Navigator').setup()
end
}
```- With [vim-plug](https://github.com/junegunn/vim-plug)
```vim
Plug 'numToStr/Navigator.nvim'" Somewhere after plug#end()
lua require('Navigator').setup()
```### ⚒️ Setup
#### Neovim
```lua
require('Navigator').setup()
```- Keybindings
> **Note** - This plugin doesn't provide any keybindings by default, feel free to use (and modify) the following or create your own keybindings.
```lua
vim.keymap.set({'n', 't'}, '', 'NavigatorLeft')
vim.keymap.set({'n', 't'}, '', 'NavigatorRight')
vim.keymap.set({'n', 't'}, '', 'NavigatorUp')
vim.keymap.set({'n', 't'}, '', 'NavigatorDown')
vim.keymap.set({'n', 't'}, '', 'NavigatorPrevious')
```#### Multiplexer(s)
> **Note** - This plugin doesn't provide any configuration for multiplexers, feel free to use (and modify) the snippet for multiplexer of your choice by following the links below.
- [Tmux](https://github.com/numToStr/Navigator.nvim/wiki/Tmux-Integration)
- [WezTerm](https://github.com/numToStr/Navigator.nvim/wiki/WezTerm-Integration)#### Configuration (optional)
Following options can be given when calling `setup({config})`. Below is the default configuration
```lua
{
-- Save modified buffer(s) when moving to mux
-- nil - Don't save (default)
-- 'current' - Only save the current modified buffer
-- 'all' - Save all the buffers
auto_save = nil,-- Disable navigation when the current mux pane is zoomed in
disable_on_zoom = false,-- Multiplexer to use
-- 'auto' - Chooses mux based on priority (default)
-- table - Custom mux to use
mux = 'auto'
}
```> Read: [How to create and integrate custom multiplexer?](https://github.com/numToStr/Navigator.nvim/wiki/Custom-Multiplexer)
### 🔥 Usage
#### Commands
- `NavigatorLeft` - Go to left split/pane
- `NavigatorRight` - Go to right split/pane
- `NavigatorUp` - Go to upper split/pane
- `NavigatorDown` - Go to down split/pane
- `NavigatorPrevious` - Go to previous split/pane> Read `:h navigator.commands` for more info
#### Lua API
```lua
require('Navigator').left()
require('Navigator').right()
require('Navigator').up()
require('Navigator').down()
require('Navigator').previous()
```> Read `:h navigator.api` for more info
### 💐 Credits
- [vim-tmux-navigator](https://github.com/christoomey/vim-tmux-navigator) - Motivator and Vimscript cousin