alexghergh / nvim-tmux-navigation

Easy Neovim-Tmux navigation, completely written in Lua
MIT License
273 stars 21 forks source link

Update for Neovim 0.7.0 #5

Closed alexghergh closed 1 year ago

alexghergh commented 2 years ago

Following the release of Neovim 0.7.0, the keymap Lua API is improved. The code should change to reflect that.

Diablo-D3 commented 1 year ago
local tmux = require('nvim-tmux-navigation')

tmux.setup {
    disable_when_zoomed = true
}

vim.keymap.set('n', "<C-h>", tmux.NvimTmuxNavigateLeft)
vim.keymap.set('n', "<C-j>", tmux.NvimTmuxNavigateRight)
vim.keymap.set('n', "<C-k>", tmux.NvimTmuxNavigateUp)
vim.keymap.set('n', "<C-l>", tmux.NvimTmuxNavigateDown)
vim.keymap.set('n', "<C-\\>", tmux.NvimTmuxNavigateLastActive)
vim.keymap.set('n', "<C-Space>", tmux.NvimTmuxNavigateNext)
alexghergh commented 1 year ago

Pushed a commit to reflect the changes. Thank you for the example code!

Closing the issue.