Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

✨ Smoothly navigate between neovim and terminal multiplexer(s) ✨

License

Notifications You must be signed in to change notification settings

numToStr/Navigator.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

38 Commits

Repository files navigation

Navigator.nvim

✨ Smoothly navigate between neovim and multiplexer(s) ✨

Navigator

Navigator.nvim provides set of functions and commands that allows you to seamlessly navigate between neovim and different terminal multiplexers.

πŸš€ Installation

Neovim

use {
 'numToStr/Navigator.nvim',
 config = function()
 require('Navigator').setup()
 end
}
Plug 'numToStr/Navigator.nvim'
" Somewhere after plug#end()
lua require('Navigator').setup()

βš’οΈ Setup

Neovim

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.

vim.keymap.set({'n', 't'}, '<A-h>', '<CMD>NavigatorLeft<CR>')
vim.keymap.set({'n', 't'}, '<A-l>', '<CMD>NavigatorRight<CR>')
vim.keymap.set({'n', 't'}, '<A-k>', '<CMD>NavigatorUp<CR>')
vim.keymap.set({'n', 't'}, '<A-j>', '<CMD>NavigatorDown<CR>')
vim.keymap.set({'n', 't'}, '<A-p>', '<CMD>NavigatorPrevious<CR>')

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.

Configuration (optional)

Following options can be given when calling setup({config}). Below is the default configuration

{
 -- 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?

πŸ”₯ 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

require('Navigator').left()
require('Navigator').right()
require('Navigator').up()
require('Navigator').down()
require('Navigator').previous()

Read :h navigator.api for more info

πŸ’ Credits

About

✨ Smoothly navigate between neovim and terminal multiplexer(s) ✨

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 7

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /