hydra.nvim
hydra.nvim copied to clipboard
example: window resize without dependencies
trafficstars
Here is my simple one for window resizing, which should hopefully attract more users. I find resizing manually always annoying, because neovim does not show size markers (horizontal and vertical lines of a drawing program) and neither percentag size [due to shell limitations and not using sixels etc].
M.window_hdyra = Hydra({
body = '<C-w>',
heads = {
-- The following depend highly on your workflow
-- { 'h', '<C-w>h' },
-- { 'j', '<C-w>j' },
-- { 'k', '<C-w>k' },
-- { 'l', '<C-w>l' },
-- other use cases: scrolling (C-d,C-u,C-e,C-y), copy+paste
{ 's', '<C-w>s' },
{ 'v', '<C-w>v' },
{ '+', '<C-w>+' },
{ '-', '<C-w>-' },
{ '>', '<C-w>>' },
{ '<', '<C-w><' },
{ '=', '<C-w>=' },
{ 'q', '<cmd>close<CR>' },
{ 'o', '<cmd>only<CR>' },
{ '_', '<C-w>_' },
{ '|', '<C-w>|' },
{ '<Esc>', nil, { exit = true, desc = false } },
},
})
