Compare commits
3 commits
4aeab6127f
...
94f3b169bb
Author | SHA1 | Date | |
---|---|---|---|
94f3b169bb | |||
9bae641b35 | |||
c6c097057c |
1 changed files with 19 additions and 20 deletions
|
@ -1,27 +1,26 @@
|
||||||
return {
|
return {
|
||||||
{ "mrjones2014/smart-splits.nvim" },
|
{ "mrjones2014/smart-splits.nvim" },
|
||||||
lazy = false,
|
lazy = false,
|
||||||
config = function()
|
keys = {
|
||||||
local smart_splits = require("smart-splits")
|
|
||||||
local keymap = vim.keymap
|
|
||||||
-- recommended mappings
|
|
||||||
-- resizing splits
|
-- resizing splits
|
||||||
-- these keymaps will also accept a range,
|
{ "<A-a>", ":lua require('smart-splits').resize_left()<CR>", desc = "smart split: resize left" },
|
||||||
-- for example `10<A-h>` will `resize_left` by `(10 * config.default_amount)`
|
{ "<A-o>", ":lua require('smart-splits').resize_down()<CR>", desc = "smart split: resize down" },
|
||||||
keymap.set("n", "<A-h>", smart_splits.resize_left)
|
{ "<A-e>", ":lua require('smart-splits').resize_up()<CR>", desc = "smart split: resize up" },
|
||||||
keymap.set("n", "<A-j>", smart_splits.resize_down)
|
{ "<A-u>", ":lua require('smart-splits').resize_right()<CR>", desc = "smart split: resize right" },
|
||||||
keymap.set("n", "<A-k>", smart_splits.resize_up)
|
|
||||||
keymap.set("n", "<A-l>", smart_splits.resize_right)
|
|
||||||
-- moving between splits
|
-- moving between splits
|
||||||
keymap.set("n", "<C-h>", smart_splits.move_cursor_left)
|
{ "<C-a>", ":lua require('smart-splits').move_cursor_left()<CR>", desc = "smart split: move cursor left" },
|
||||||
keymap.set("n", "<C-j>", smart_splits.move_cursor_down)
|
{ "<C-o>", ":lua require('smart-splits').move_cursor_down()<CR>", desc = "smart split: move cursor up" },
|
||||||
keymap.set("n", "<C-k>", smart_splits.move_cursor_up)
|
{ "<C-e>", ":lua require('smart-splits').move_cursor_up()<CR>", desc = "smart split: move cursor up" },
|
||||||
keymap.set("n", "<C-l>", smart_splits.move_cursor_right)
|
{ "<C-u>", ":lua require('smart-splits').move_cursor_right()<CR>", desc = "smart split: move cursor right" },
|
||||||
keymap.set("n", "<C-\\>", smart_splits.move_cursor_previous)
|
{
|
||||||
|
"<C-\\>",
|
||||||
|
":lua require('smart-splits').move_cursor_previous()<CR>",
|
||||||
|
desc = "smart split: move cursor to previous",
|
||||||
|
},
|
||||||
-- swapping buffers between windows
|
-- swapping buffers between windows
|
||||||
keymap.set("n", "<leader><leader>h", smart_splits.swap_buf_left)
|
{ "<leader><leader>a", ":lua require('smart-splits').swap_buf_left()<CR>", desc = "smart split: swap left" },
|
||||||
keymap.set("n", "<leader><leader>j", smart_splits.swap_buf_down)
|
{ "<leader><leader>o", ":lua require('smart-splits').swap_buf_down()<CR>", desc = "smart split: swap down" },
|
||||||
keymap.set("n", "<leader><leader>k", smart_splits.swap_buf_up)
|
{ "<leader><leader>e", ":lua require('smart-splits').swap_buf_up()<CR>", desc = "smart split: swap up" },
|
||||||
keymap.set("n", "<leader><leader>l", smart_splits.swap_buf_right)
|
{ "<leader><leader>u", ":lua require('smart-splits').swap_buf_right()<CR>", desc = "smart split: swap right" },
|
||||||
end,
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue