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

23 lines
1.2 KiB
Lua
Raw Normal View History

2024-10-30 23:56:08 -07:00
return {
{ "mrjones2014/smart-splits.nvim" },
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:48:29 -07:00
{ "n", "<A-a>", ":lua require('smart-splits').resize_left()<CR>" },
{ "n", "<A-o>", ":lua require('smart-splits').resize_down()<CR>" },
{ "n", "<A-e>", ":lua require('smart-splits').resize_up()<CR>" },
{ "n", "<A-u>", ":lua require('smart-splits').resize_right()<CR>" },
2024-10-30 23:56:08 -07:00
-- moving between splits
2024-11-01 17:48:29 -07:00
{ "n", "<C-a>", ":lua require('smart-splits').move_cursor_left()<CR>" },
{ "n", "<C-o>", ":lua require('smart-splits').move_cursor_down()<CR>" },
{ "n", "<C-e>", ":lua require('smart-splits').move_cursor_up()<CR>" },
{ "n", "<C-u>", ":lua require('smart-splits').move_cursor_right()<CR>" },
{ "n", "<C-\\>", ":lua require('smart-splits').move_cursor_previous()<CR>" },
2024-10-30 23:56:08 -07:00
-- swapping buffers between windows
2024-11-01 17:48:29 -07:00
{ "n", "<leader><leader>a", ":lua require('smart-splits').swap_buf_left()<CR>" },
{ "n", "<leader><leader>o", ":lua require('smart-splits').swap_buf_down()<CR>" },
{ "n", "<leader><leader>e", ":lua require('smart-splits').swap_buf_up()<CR>" },
{ "n", "<leader><leader>u", ":lua require('smart-splits').swap_buf_right()<CR>" },
},
2024-10-30 23:56:08 -07:00
}