nvim-config/lua/plugins/smart-splits.lua

27 lines
1.6 KiB
Lua
Raw Permalink Normal View History

2024-10-30 23:56:08 -07:00
return {
2024-11-01 18:06:13 -07:00
"mrjones2014/smart-splits.nvim",
2024-10-30 23:56:08 -07:00
lazy = false,
2024-11-01 17:48:29 -07:00
keys = {
2024-10-30 23:56:08 -07:00
-- resizing splits
2024-11-01 17:56:44 -07:00
{ "<A-a>", ":lua require('smart-splits').resize_left()<CR>", desc = "smart split: resize left" },
{ "<A-o>", ":lua require('smart-splits').resize_down()<CR>", desc = "smart split: resize down" },
{ "<A-e>", ":lua require('smart-splits').resize_up()<CR>", desc = "smart split: resize up" },
{ "<A-u>", ":lua require('smart-splits').resize_right()<CR>", desc = "smart split: resize right" },
2024-10-30 23:56:08 -07:00
-- moving between splits
2024-11-01 17:56:44 -07:00
{ "<C-a>", ":lua require('smart-splits').move_cursor_left()<CR>", desc = "smart split: move cursor left" },
{ "<C-o>", ":lua require('smart-splits').move_cursor_down()<CR>", desc = "smart split: move cursor up" },
{ "<C-e>", ":lua require('smart-splits').move_cursor_up()<CR>", desc = "smart split: move cursor up" },
{ "<C-u>", ":lua require('smart-splits').move_cursor_right()<CR>", desc = "smart split: move cursor right" },
{
"<C-\\>",
":lua require('smart-splits').move_cursor_previous()<CR>",
desc = "smart split: move cursor to previous",
},
2024-10-30 23:56:08 -07:00
-- swapping buffers between windows
2024-11-01 17:56:44 -07:00
{ "<leader><leader>a", ":lua require('smart-splits').swap_buf_left()<CR>", desc = "smart split: swap left" },
{ "<leader><leader>o", ":lua require('smart-splits').swap_buf_down()<CR>", desc = "smart split: swap down" },
{ "<leader><leader>e", ":lua require('smart-splits').swap_buf_up()<CR>", desc = "smart split: swap up" },
{ "<leader><leader>u", ":lua require('smart-splits').swap_buf_right()<CR>", desc = "smart split: swap right" },
2024-11-01 17:48:29 -07:00
},
2024-10-30 23:56:08 -07:00
}