Switching between AstroVim v4 and Kitty terminal And by Vim split with the same keys
https://github.com/mrjones2014/smart-splits.nvim/tree/master?tab=readme-ov-file#configuration
Switching between AstroVim v4 and Kitty terminal And by Vim split with the same keys
https://github.com/mrjones2014/smart-splits.nvim/tree/master?tab=readme-ov-file#configuration
map ctrl+j kitten pass_keys.py neighboring_window bottom ctrl+j | |
map ctrl+k kitten pass_keys.py neighboring_window top ctrl+k | |
map ctrl+h kitten pass_keys.py neighboring_window left ctrl+h | |
map ctrl+l kitten pass_keys.py neighboring_window right ctrl+l | |
# the 3 here is the resize amount, adjust as needed | |
map alt+j kitten pass_keys.py relative_resize down 3 alt+j | |
map alt+k kitten pass_keys.py relative_resize up 3 alt+k | |
map alt+h kitten pass_keys.py relative_resize left 3 alt+h | |
map alt+l kitten pass_keys.py relative_resize right 3 alt+l | |
allow_remote_control yes | |
listen_on unix:@mykitty |
-- in nvim/lua/mappings.lua | |
-- resizing splits | |
-- these keymaps will also accept a range, | |
-- for example `10<A-h>` will `resize_left` by `(10 * config.default_amount)` | |
vim.keymap.set("n", "<A-h>", require("smart-splits").resize_left) | |
vim.keymap.set("n", "<A-j>", require("smart-splits").resize_down) | |
vim.keymap.set("n", "<A-k>", require("smart-splits").resize_up) | |
vim.keymap.set("n", "<A-l>", require("smart-splits").resize_right) | |
-- moving between splits | |
vim.keymap.set("n", "<C-h>", require("smart-splits").move_cursor_left) | |
vim.keymap.set("n", "<C-j>", require("smart-splits").move_cursor_down) | |
vim.keymap.set("n", "<C-k>", require("smart-splits").move_cursor_up) | |
vim.keymap.set("n", "<C-l>", require("smart-splits").move_cursor_right) | |
vim.keymap.set("n", "<C-\\>", require("smart-splits").move_cursor_previous) | |
-- swapping buffers between windows | |
vim.keymap.set("n", "<leader><leader>h", require("smart-splits").swap_buf_left) | |
vim.keymap.set("n", "<leader><leader>j", require("smart-splits").swap_buf_down) | |
vim.keymap.set("n", "<leader><leader>k", require("smart-splits").swap_buf_up) | |
vim.keymap.set("n", "<leader><leader>l", require("smart-splits").swap_buf_right) |
-- in nvim/lua/plugins/smart-split.lua | |
return { | |
{ | |
"mrjones2014/smart-splits.nvim", | |
build = "./kitty/install-kittens.bash" | |
}, | |
} |