Skip to content

ofirgall/Navigator.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Navigator.nvim

✨ Smoothly navigate between splits and panes ✨

Navigator

🚀 Installation

Neovim

use {
    'numToStr/Navigator.nvim',
    config = function()
        require('Navigator').setup()
    end
}
Plug 'numToStr/Navigator.nvim'

" Somewhere after plug#end()
lua require('Navigator').setup()

Tmux

This plugin doesn't provides any configuration for tmux. You can read here to how to setup your tmux.

Or, you can use tmux-tilish which is an excellent tmux plugin.

⚒️ Setup

-- Configuration
require('Navigator').setup()

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

Configuration (optional)

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

{
    -- When you want to save the modified buffers when moving to tmux
    -- nil - Don't save (default)
    -- 'current' - Only save the current modified buffer
    -- 'all' - Save all the buffers
    auto_save = nil,

    -- Disable navigation when tmux is zoomed in
    disable_on_zoom = false
}

🔥 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

Lua API

require('Navigator').left()

require('Navigator').right()

require('Navigator').up()

require('Navigator').down()

require('Navigator').previous()

💐 Credits

About

✨ Smoothly navigate between neovim splits and tmux panes ✨

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Lua 100.0%