Skip to content

Commit 3a8076d

Browse files
sand4rtFernando
authored andcommitted
feat(keymap): move windows without <C-w> (nvim-lua#1368)
1 parent b579ad9 commit 3a8076d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

init.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
202202
vim.api.nvim_set_keymap('n', '<C-s>', ':w<CR>', { noremap = true, silent = true })
203203
vim.api.nvim_set_keymap('i', '<C-s>', '<Esc>:w<CR>a', { noremap = true, silent = true })
204204
vim.api.nvim_set_keymap('v', '<C-s>', '<Esc>:w<CR>gv', { noremap = true, silent = true })
205+
-- NOTE: Some terminals have coliding keymaps or are not able to send distinct keycodes
206+
-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
207+
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
208+
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
209+
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
205210

206211
-- [[ Basic Autocommands ]]
207212
-- See `:help lua-guide-autocommands`

0 commit comments

Comments
 (0)