hydra.nvim icon indicating copy to clipboard operation
hydra.nvim copied to clipboard

example: window resize without dependencies

Open matu3ba opened this issue 3 years ago • 1 comments
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 } },
   },
})

matu3ba avatar Sep 26 '22 21:09 matu3ba

window_resizing

matu3ba avatar Sep 26 '22 21:09 matu3ba