2024-06-23 04:55:57 +03:00
|
|
|
{ ... }: let
|
|
|
|
stepVertical = 2;
|
|
|
|
stepHorizontal = 4;
|
|
|
|
in {
|
2024-04-06 03:03:58 +03:00
|
|
|
text = ''
|
|
|
|
-- Switch windows.
|
2024-06-23 04:55:57 +03:00
|
|
|
rekey_normal("<Leader>a", "<C-w>h")
|
|
|
|
rekey_normal("<Leader>d", "<C-w>l")
|
|
|
|
rekey_normal("<Leader>s", "<C-w>j")
|
|
|
|
rekey_normal("<Leader>w", "<C-w>k")
|
2024-04-06 03:03:58 +03:00
|
|
|
|
|
|
|
-- Switch buffers.
|
2024-06-23 04:55:57 +03:00
|
|
|
rekey_normal("<Leader>E", "<cmd>BufferLineMoveNext<cr>")
|
|
|
|
rekey_normal("<Leader>Q", "<cmd>BufferLineMovePrev<cr>")
|
|
|
|
rekey_normal("<Leader>e", "<cmd>BufferLineCycleNext<cr>")
|
|
|
|
rekey_normal("<Leader>q", "<cmd>BufferLineCyclePrev<cr>")
|
2024-04-06 03:03:58 +03:00
|
|
|
|
|
|
|
-- Splits.
|
2024-06-23 18:49:50 +03:00
|
|
|
rekey_normal("<Leader>\\", "<cmd>vsplit<cr>")
|
|
|
|
rekey_normal("<Leader>-", "<cmd>split<cr>")
|
2024-06-23 04:55:57 +03:00
|
|
|
rekey_normal("<Leader>=", "<C-w>=") -- Equalize split sizes.
|
|
|
|
rekey_normal("<Leader>c", "<C-w>q") -- Close split.
|
2024-04-06 03:03:58 +03:00
|
|
|
|
|
|
|
-- Resize splits.
|
2024-06-23 04:55:57 +03:00
|
|
|
rekey_normal("<Leader>h", "${toString stepHorizontal}<C-w><")
|
|
|
|
rekey_normal("<Leader>l", "${toString stepHorizontal}<C-w>>")
|
|
|
|
rekey_normal("<Leader>j", "${toString stepVertical}<C-w>+")
|
|
|
|
rekey_normal("<Leader>k", "${toString stepVertical}<C-w>-")
|
2024-04-06 03:03:58 +03:00
|
|
|
|
|
|
|
-- Move splits.
|
2024-06-23 04:55:57 +03:00
|
|
|
rekey_normal("<Leader>A", "<C-w>A")
|
|
|
|
rekey_normal("<Leader>D", "<C-w>D")
|
|
|
|
rekey_normal("<Leader>S", "<C-w>S")
|
|
|
|
rekey_normal("<Leader>W", "<C-w>W")
|
2024-04-06 03:03:58 +03:00
|
|
|
'';
|
|
|
|
}
|