win-mover.nvim
is a Neovim window mover that ignores side windows.
Install it with your favorite plugin manager:
{
'ycdzj/win-mover.nvim',
lazy = false,
opts = {}, -- configuration goes here
}
use {
'ycdzj/win-mover.nvim',
config = function()
local win_mover = require('win-mover')
win_mover.setup({}) -- configuration goes here
end,
}
Plug 'ycdzj/win-mover.nvim'
require('win-mover').setup
with your configuration before using this plugin.{
ignore = {
enable = false,
filetypes = {},
},
highlight = {
color = '#2e3440',
transparency = 60,
},
move_mode = {
keymap = {},
},
}
This is an example configuration that:
<leader>e
for entering Move Mode.h,j,k,l
to move window in Move Mode.q
or <Esc>
to quit Move Mode.NvimTree
, neo-tree
, etc.local win_mover = require('win-mover')
win_mover.setup({
ignore = {
enable = true,
filetypes = { 'NvimTree', 'neo-tree', 'Outline', 'toggleterm' },
},
move_mode = {
keymap = {
h = win_mover.ops.move_left,
j = win_mover.ops.move_down,
k = win_mover.ops.move_up,
l = win_mover.ops.move_right,
H = win_mover.ops.move_far_left,
J = win_mover.ops.move_far_down,
K = win_mover.ops.move_far_up,
L = win_mover.ops.move_far_right,
q = win_mover.ops.quit,
['<Esc>'] = win_mover.ops.quit,
},
},
})
vim.keymap.set("n", "<leader>e", win_mover.enter_move_mode, { noremap = true, silent = true })
:WinMover
Enter Window Move Mode
MIT License