This repository has been archived on 2024-03-04. You can view files and clone it, but cannot push or open issues or pull requests.
linux/.config/nvim/lua/key/Navigation.lua

32 lines
988 B
Lua
Raw Normal View History

2024-02-06 15:25:18 +03:00
require("key/Rekey")
2023-08-08 16:24:15 +03:00
2024-02-06 15:25:18 +03:00
-- Switch windows.
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")
2023-08-08 16:24:15 +03:00
2024-02-06 15:25:18 +03:00
-- Switch buffers.
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>")
2023-08-08 16:24:15 +03:00
2024-02-06 15:25:18 +03:00
-- Close buffer.
rekey_normal("<Leader>x", "<cmd>bp<bar>sp<bar>bn<bar>bd<cr>")
2023-08-08 16:24:15 +03:00
2024-02-06 15:25:18 +03:00
-- Close all hidden buffers.
rekey_normal("<Leader>X", "<cmd>BDelete hidden<cr><C-l>")
2023-08-08 16:24:15 +03:00
2024-02-06 15:25:18 +03:00
-- Splits.
rekey_normal("<Leader>\\", "<cmd>vsplit<cr>")
rekey_normal("<Leader>-", "<cmd>split<cr>")
rekey_normal("<Leader>=", "<C-w>=") -- Equalize split sizes.
rekey_normal("<Leader>c", "<C-w>q") -- Close split.
2023-08-08 16:24:15 +03:00
2024-02-06 15:25:18 +03:00
-- Resize splits.
rekey_normal("<Leader>A", "4<C-w><")
rekey_normal("<Leader>D", "4<C-w>>")
rekey_normal("<Leader>S", "2<C-w>+")
rekey_normal("<Leader>W", "2<C-w>-")